app/assets/javascripts/semantic-ui/modules/behavior/form.js in semantic-ui-rails-0.10.3 vs app/assets/javascripts/semantic-ui/modules/behavior/form.js in semantic-ui-rails-0.11.0
- old
+ new
@@ -484,39 +484,39 @@
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
+ object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
- if(typeof query == 'string' && instance !== undefined) {
+ if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
- if( $.isPlainObject( instance[camelCaseValue] ) && (depth != maxDepth) ) {
- instance = instance[camelCaseValue];
+ if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
+ object = object[camelCaseValue];
}
- else if( instance[camelCaseValue] !== undefined ) {
- found = instance[camelCaseValue];
+ else if( object[camelCaseValue] !== undefined ) {
+ found = object[camelCaseValue];
return false;
}
- else if( $.isPlainObject( instance[value] ) && (depth != maxDepth) ) {
- instance = instance[value];
+ else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
+ object = object[value];
}
- else if( instance[value] !== undefined ) {
- found = instance[value];
+ else if( object[value] !== undefined ) {
+ found = object[value];
return false;
}
else {
- module.error(error.method, query);
return false;
}
});
}
if ( $.isFunction( found ) ) {