From 95c782a8aa2e6cf698883bf42b67bf509a9b25fb Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Mon, 29 Nov 2021 11:15:28 -0800 Subject: [PATCH] fix: Prevent error when maxTrashcanContents is 0 Resolves #5729. --- core/trashcan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/trashcan.js b/core/trashcan.js index 3ef5ec3c0..417886088 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(); }; /**