diff --git a/Source/Scene/Cesium3DTileset.js b/Source/Scene/Cesium3DTileset.js index c183104d7fb8..d6f9518b5ea4 100644 --- a/Source/Scene/Cesium3DTileset.js +++ b/Source/Scene/Cesium3DTileset.js @@ -1247,6 +1247,8 @@ define([ * * @memberof Cesium3DTileset.prototype * + * @exception {DeveloperError} The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true. + * * @type {*} * @readonly * @@ -1254,6 +1256,12 @@ define([ */ extras : { get : function() { + //>>includeStart('debug', pragmas.debug); + if (!this.ready) { + throw new DeveloperError('The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.'); + } + //>>includeEnd('debug'); + return this._extras; } }