From 1cd3419688795d4c65eb41c3afe89d3de57cf457 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 13 Feb 2020 05:08:01 +0900 Subject: [PATCH] Refactor --- src/client/mios.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/mios.ts b/src/client/mios.ts index 5ab4a53d8..813617c7d 100644 --- a/src/client/mios.ts +++ b/src/client/mios.ts @@ -42,9 +42,9 @@ export default class MiOS extends EventEmitter { * @param callback A function that call when initialized */ @autobind - public async init(_callback) { - const callback = () => { - _callback(); + public async init(callback) { + const finish = () => { + callback(); this.store.dispatch('instance/fetch').then(() => { // Init service worker @@ -104,7 +104,7 @@ export default class MiOS extends EventEmitter { this.initStream(); // Finish init - callback(); + finish(); }; // キャッシュがあったとき @@ -133,7 +133,7 @@ export default class MiOS extends EventEmitter { this.initStream(); // Finish init - callback(); + finish(); } }); }