mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
chore: move remaining functions out of utils.js (#5714)
* chore: move arrayRemove to a new utils.array namespace * chore: move getBlockTypeCounts out of utils.js * chore: remove last functions from utils.js * chore: reorder imports * chore: add re-export for runAfterPageLoad
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
*/
|
||||
goog.module('Blockly.ThemeManager');
|
||||
|
||||
const arrayUtils = goog.require('Blockly.utils.array');
|
||||
const dom = goog.require('Blockly.utils.dom');
|
||||
const utils = goog.require('Blockly.utils');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const {Theme} = goog.requireType('Blockly.Theme');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
@@ -138,7 +138,7 @@ ThemeManager.prototype.subscribeWorkspace = function(workspace) {
|
||||
* @package
|
||||
*/
|
||||
ThemeManager.prototype.unsubscribeWorkspace = function(workspace) {
|
||||
if (!utils.arrayRemove(this.subscribedWorkspaces_, workspace)) {
|
||||
if (!arrayUtils.removeElem(this.subscribedWorkspaces_, workspace)) {
|
||||
throw Error('Cannot unsubscribe a workspace that hasn\'t been subscribed.');
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user