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
With Angular I get the below warning message when running ng serve.
▲ [WARNING] Comparison using the "!==" operator here is always true [equals-new-object]
angular:script/global:scripts.js:11:11451:
11 │ ...p,u,d,g,m,f,x,v,y,V,w,S,M;if(t!=={}){for(l=t.divisions||0,w=t.s...
╵ ~~~
Equality with a new object is always false in JavaScript because the equality operator tests object identity. You need to write code to compare the contents of the object instead. For example, use "Array.isArray(x) && x.length === 0" instead of "x === []" to test for an empty array.
Based on the warning, the issue is this line: if (ticksOptions !== {}) {
The text was updated successfully, but these errors were encountered:
szape89
changed the title
Waning about inappropriate equality comparison with a new object
Warning about inappropriate equality comparison with a new object
Aug 2, 2024
With Angular I get the below warning message when running
ng serve
.Based on the warning, the issue is this line:
if (ticksOptions !== {}) {
The text was updated successfully, but these errors were encountered: