skapi-js 1.0.45-beta.4 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/skapi.js +1 -1
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.module.js +1 -1
- package/dist/skapi.module.js.map +1 -1
- package/js/main/skapi.js +4 -2
- package/package.json +1 -1
package/js/main/skapi.js
CHANGED
|
@@ -160,7 +160,6 @@ export default class Skapi {
|
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
let exec = () => {
|
|
163
|
-
this.closeRealtime();
|
|
164
163
|
let data = {};
|
|
165
164
|
const to_be_cached = [
|
|
166
165
|
'__startKeyHistory',
|
|
@@ -178,7 +177,10 @@ export default class Skapi {
|
|
|
178
177
|
};
|
|
179
178
|
return (process instanceof Promise) ? process.then(() => exec()) : exec();
|
|
180
179
|
};
|
|
181
|
-
window.addEventListener('beforeunload',
|
|
180
|
+
window.addEventListener('beforeunload', () => {
|
|
181
|
+
this.closeRealtime();
|
|
182
|
+
storeClassProperties();
|
|
183
|
+
});
|
|
182
184
|
window.addEventListener("visibilitychange", storeClassProperties);
|
|
183
185
|
await process;
|
|
184
186
|
await this.__authConnection;
|