You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
When I try to use the latest jQuery version (3.1.0) together with jQuery Migrate (3.0.0) I get the following error:
angular.js:13236 TypeError: string.replace is not a function
at Function.camelCase (jquery-3.1.0.js:355)
at Function.jQuery.data (jquery-migrate-3.0.0.js:306)
at replaceWith (angular.js:9466)
at angular.js:9177
at processQueue (angular.js:15552)
at angular.js:15568
at Scope.$eval (angular.js:16820)
at Scope.$digest (angular.js:16636)
at Scope.$apply (angular.js:16928)
at bootstrapApply (angular.js:1694)
@Nesse
We had a similar problem and the issue lies in the migrate plugin. Angular uses jQuery.data() internally and sometimes it passes a scope object for the name argument.
// jquery-migrate-3.js
...
jQuery.data = function( elem, name, value ) { // sometimes name is a scope object here
var curData;
// If the name is transformed, look for the un-transformed name in the data object
if ( name && typeof name === "string" && name !== jQuery.camelCase( name ) ) { // << added type check
curData = jQuery.hasData( elem ) && oldData.call( this, elem );
...
Try adding a typeofcheck in the if to make sure the migrate plugin only warns if the name actually is a string.
When I try to use the latest jQuery version (3.1.0) together with jQuery Migrate (3.0.0) I get the following error:
angular.js:13236 TypeError: string.replace is not a function
at Function.camelCase (jquery-3.1.0.js:355)
at Function.jQuery.data (jquery-migrate-3.0.0.js:306)
at replaceWith (angular.js:9466)
at angular.js:9177
at processQueue (angular.js:15552)
at angular.js:15568
at Scope.$eval (angular.js:16820)
at Scope.$digest (angular.js:16636)
at Scope.$apply (angular.js:16928)
at bootstrapApply (angular.js:1694)
http://run.plnkr.co/Dhsbj67CMvE40tQW/
Is it possible to use ui-select along with jQuery and jQuery Migrate?
The text was updated successfully, but these errors were encountered: