diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index 4de4d56612bc..651e794471e7 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -203,7 +203,7 @@ define([ deferred.reject(reader.error); }); reader.readAsArrayBuffer(magicBlob); - return deferred; + return deferred.promise; } function readBlobAsText(blob) { @@ -216,7 +216,7 @@ define([ deferred.reject(reader.error); }); reader.readAsText(blob); - return deferred; + return deferred.promise; } function loadXmlFromZip(reader, entry, uriResolver, deferred) { @@ -1644,7 +1644,7 @@ define([ deferred.reject(e); }); - return deferred; + return deferred.promise; } /** diff --git a/Source/Scene/GroundPrimitive.js b/Source/Scene/GroundPrimitive.js index 0e2c825c4f81..e97362abaa94 100644 --- a/Source/Scene/GroundPrimitive.js +++ b/Source/Scene/GroundPrimitive.js @@ -302,7 +302,7 @@ define([ */ readyPromise : { get : function() { - return this._readyPromise; + return this._readyPromise.promise; } } }); diff --git a/Source/Scene/Model.js b/Source/Scene/Model.js index fc59f40598d0..70cd6ec80f70 100644 --- a/Source/Scene/Model.js +++ b/Source/Scene/Model.js @@ -686,7 +686,7 @@ define([ */ readyPromise : { get : function() { - return this._readyPromise; + return this._readyPromise.promise; } }, @@ -3103,7 +3103,7 @@ define([ var model = this; frameState.afterRender.push(function() { model._ready = true; - model.readyPromise.resolve(model); + model._readyPromise.resolve(model); }); return; } diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index 5d9b6f8152ea..ceef4df0db16 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -433,7 +433,7 @@ define([ */ readyPromise : { get : function() { - return this._readyPromise; + return this._readyPromise.promise; } } }); diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js index 9537d5f8d51d..74001f284302 100644 --- a/Source/Widgets/Viewer/Viewer.js +++ b/Source/Widgets/Viewer/Viewer.js @@ -1557,7 +1557,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to } }); - return zoomPromise; + return zoomPromise.promise; } function clearZoom(viewer) {