Merge pull request #1504 from areyeshot/develop

fix #1376
This commit is contained in:
Rachel Fenichel
2017-12-13 09:41:40 -08:00
committed by GitHub

View File

@@ -74,6 +74,9 @@ Blockly.Extensions.register = function(name, initFn) {
* registered.
*/
Blockly.Extensions.registerMixin = function(name, mixinObj) {
if (!goog.isObject(mixinObj)){
throw new Error('Error: Mixin "' + name + '" must be a object');
}
Blockly.Extensions.register(name, function() {
this.mixin(mixinObj);
});