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/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', storeClassProperties);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skapi-js",
3
- "version": "1.0.45-beta.4",
3
+ "version": "1.0.45",
4
4
  "description": "Skapi: Backend API Library for HTML frontend.",
5
5
  "main": "./dist/skapi.module.js",
6
6
  "types": "./js/Main.d.ts",