Explorar o código

that = this is no longer allowed :)

Raanan Weber %!s(int64=7) %!d(string=hai) anos
pai
achega
1dd316fbbf
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  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) {
         public openAsync(successCallback: () => void, errorCallback: () => void) {
-            function handleError() {
-                that.isSupported = false;
+            let handleError = () => {
+                this.isSupported = false;
                 if (errorCallback) errorCallback();
                 if (errorCallback) errorCallback();
             }
             }
 
 
-            var that = this;
             if (!this.idbFactory || !(this._enableSceneOffline || this._enableTexturesOffline)) {
             if (!this.idbFactory || !(this._enableSceneOffline || this._enableTexturesOffline)) {
                 // Your browser doesn't support IndexedDB
                 // Your browser doesn't support IndexedDB
                 this.isSupported = false;
                 this.isSupported = false;