Browse Source

that = this is no longer allowed :)

Raanan Weber 7 years ago
parent
commit
1dd316fbbf
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/Tools/babylon.database.ts

+ 2 - 3
src/Tools/babylon.database.ts

@@ -124,12 +124,11 @@ module BABYLON {
         }
 
         public openAsync(successCallback: () => void, errorCallback: () => void) {
-            function handleError() {
-                that.isSupported = false;
+            let handleError = () => {
+                this.isSupported = false;
                 if (errorCallback) errorCallback();
             }
 
-            var that = this;
             if (!this.idbFactory || !(this._enableSceneOffline || this._enableTexturesOffline)) {
                 // Your browser doesn't support IndexedDB
                 this.isSupported = false;