buberdds / angular-bootstrap-colorpicker

Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.
MIT License
419 stars 226 forks source link

Cannot Call Method Exec of Undefined #18

Closed ProdigyView closed 11 years ago

ProdigyView commented 11 years ago

In my setup I get this error:

TypeError: Cannot call method 'exec' of undefined at Object.setColor (http://portal.engagement.com/js/directives/bootstrap_colorpicker_module.js:149:33) at update (http://portal.engagement.com/js/directives/bootstrap_colorpicker_module.js:356:23) at Object.fn (http://portal.engagement.com/js/directives/bootstrap_colorpicker_module.js:251:13) at Object.Scope.$digest (http://portal.engagement.com/js/libs/angular.js:8097:27) at Object.Scope.$apply (http://portal.engagement.com/js/libs/angular.js:8304:24) at http://portal.engagement.com/js/libs/angular.js:1040:15 at Object.invoke (http://portal.engagement.com/js/libs/angular.js:2993:25) at doBootstrap (http://portal.engagement.com/js/libs/angular.js:1038:14) at bootstrap (http://portal.engagement.com/js/libs/angular.js:1052:12) at angularInit (http://portal.engagement.com/js/libs/angular.js:1010:5)

Which corresponds to this line:

var match = parser.re.exec(val),

In the setColor function

buberdds commented 11 years ago

Are you using any other directives with an input element?

buberdds commented 11 years ago

Cannot reproduce

johnculviner commented 10 years ago

This was caused for me by defining an "Array.prototype.remove" globally. I'll check back if I find a way around it.

buberdds commented 10 years ago

Thanks, I'll check this out. I think it can be related to #32

johnculviner commented 10 years ago

Yup, for sure. Yeah you fixed it on the other branch. Mom always told me not to extend prototypes... haha. Thanks for the plugin!