diff --git a/core/interfaces/i_positionable.js b/core/interfaces/i_positionable.js index 82c49c3fe..a8fc918bd 100644 --- a/core/interfaces/i_positionable.js +++ b/core/interfaces/i_positionable.js @@ -43,7 +43,7 @@ IPositionable.prototype.position; /** * Returns the bounding rectangle of the UI element in pixel units relative to * the Blockly injection div. - * @return {?Rect} The UI elements’s bounding box. Null if + * @return {?Rect} The UI elements's bounding box. Null if * bounding box should be ignored by other UI elements. */ IPositionable.prototype.getBoundingRectangle; diff --git a/core/trashcan.js b/core/trashcan.js index 3ef5ec3c0..698eb7a74 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -387,7 +387,7 @@ Trashcan.prototype.hasContents_ = function() { * @return {boolean} True if the trashcan contents-flyout is currently open. */ Trashcan.prototype.contentsIsOpen = function() { - return this.flyout.isVisible(); + return !!this.flyout && this.flyout.isVisible(); }; /** @@ -480,7 +480,7 @@ Trashcan.prototype.position = function(metrics, savedPositions) { /** * Returns the bounding rectangle of the UI element in pixel units relative to * the Blockly injection div. - * @return {?Rect} The UI elements’s bounding box. Null if + * @return {?Rect} The UI elements's bounding box. Null if * bounding box should be ignored by other UI elements. */ Trashcan.prototype.getBoundingRectangle = function() { diff --git a/core/zoom_controls.js b/core/zoom_controls.js index 70ea5ecb2..28b2b5c32 100644 --- a/core/zoom_controls.js +++ b/core/zoom_controls.js @@ -234,7 +234,7 @@ ZoomControls.prototype.dispose = function() { /** * Returns the bounding rectangle of the UI element in pixel units relative to * the Blockly injection div. - * @return {?Rect} The UI elements’s bounding box. Null if + * @return {?Rect} The UI elements's bounding box. Null if * bounding box should be ignored by other UI elements. */ ZoomControls.prototype.getBoundingRectangle = function() {