mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
Merge branch 'develop' into merge-develop-to-goog_module
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user