Merge branch 'develop' into merge-develop-to-goog_module

This commit is contained in:
kozbial
2021-09-21 16:04:33 -07:00
265 changed files with 21385 additions and 7566 deletions

View File

@@ -22,6 +22,7 @@ const Workspace = goog.requireType('Blockly.Workspace');
/* eslint-disable-next-line no-unused-vars */
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
const dom = goog.require('Blockly.utils.dom');
const utils = goog.require('Blockly.utils');
/**
@@ -134,11 +135,9 @@ ThemeManager.prototype.subscribeWorkspace = function(workspace) {
* @package
*/
ThemeManager.prototype.unsubscribeWorkspace = function(workspace) {
const index = this.subscribedWorkspaces_.indexOf(workspace);
if (index < 0) {
if (!utils.arrayRemove(this.subscribedWorkspaces_, workspace)) {
throw Error('Cannot unsubscribe a workspace that hasn\'t been subscribed.');
}
this.subscribedWorkspaces_.splice(index, 1);
};
/**