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
The overrided function to support empty array is bugged.
If the value is NOT an array or string but a number, the function return true, but ... it's not empty !
Because evaluate of "!(123).length" is "true" !
In addition, $isEmpty from Angular is lost by override, and it's a very bad idea. We must keep this function for next evolution.
I made a quick fix by a new function :
functionisEmpty2(val,modelCtrl){if($.isArray(val))return(val.length>0) ? false : true;returnmodelCtrl.$isEmpty(val);//call to real Angular function}
The overrided function to support empty array is bugged.
If the value is NOT an array or string but a number, the function return true, but ... it's not empty !
Because evaluate of "!(123).length" is "true" !
In addition, $isEmpty from Angular is lost by override, and it's a very bad idea. We must keep this function for next evolution.
I made a quick fix by a new function :
And rewrite call in Validate() function :
The text was updated successfully, but these errors were encountered: