Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix when.defer() usage #3152

Merged
merged 1 commit into from
Oct 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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