Skip to content

Commit

Permalink
Merge pull request #3152 from AnalyticalGraphicsInc/maybe-not-always
Browse files Browse the repository at this point in the history
Fix when.defer() usage
  • Loading branch information
pjcozzi committed Oct 30, 2015
2 parents a0a1446 + c8d4fbd commit b407181
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Source/DataSources/KmlDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ define([
deferred.reject(reader.error);
});
reader.readAsArrayBuffer(magicBlob);
return deferred;
return deferred.promise;
}

function readBlobAsText(blob) {
Expand All @@ -216,7 +216,7 @@ define([
deferred.reject(reader.error);
});
reader.readAsText(blob);
return deferred;
return deferred.promise;
}

function loadXmlFromZip(reader, entry, uriResolver, deferred) {
Expand Down Expand Up @@ -1644,7 +1644,7 @@ define([
deferred.reject(e);
});

return deferred;
return deferred.promise;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/GroundPrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ define([
*/
readyPromise : {
get : function() {
return this._readyPromise;
return this._readyPromise.promise;
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions Source/Scene/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ define([
*/
readyPromise : {
get : function() {
return this._readyPromise;
return this._readyPromise.promise;
}
},

Expand Down Expand Up @@ -3103,7 +3103,7 @@ define([
var model = this;
frameState.afterRender.push(function() {
model._ready = true;
model.readyPromise.resolve(model);
model._readyPromise.resolve(model);
});
return;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/Primitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ define([
*/
readyPromise : {
get : function() {
return this._readyPromise;
return this._readyPromise.promise;
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion Source/Widgets/Viewer/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
}
});

return zoomPromise;
return zoomPromise.promise;
}

function clearZoom(viewer) {
Expand Down

0 comments on commit b407181

Please sign in to comment.