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
I'm having an issue with an array state parameter with a default empty value:
when the param is not declared in the URL pattern (param4 in the jsbin below), the default value is indeed []
when the param is declared in the URL pattern (param3 and param5) AND when it's absent from the URL (allowed since it's supposed to be optional), then it's initialized to 'undefined' (even worse than being undefined: the parameter is present in the params object but has an undefined value, which prevents me from easily using angular.extend or angular.merge, for instance)
But there is one test: expect(m.format({ param1: [] })).toBe("/foo");
with the comment before the section // empty array [] is treated like "undefined"
So if we need this behaviour, looks like we can't fix that bug.
I'm having an issue with an array state parameter with a default empty value:
See https://jsbin.com/bebeheciju/edit?html,console,output for example
The problem comes from the arrayUnwrap function in the Type definition, which specifically returns 'undefined' for empty arrays.
The text was updated successfully, but these errors were encountered: