-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to bind to moment, getting TypeError: (value || "").split is not a function #355
Comments
For more info, I had updated from 2.3.2 up to 2.7.4 when I experienced the bug. I decided to downgrade to 2.3.2 and incrementally test each version to figure out where it stopped working and 2.5.0 is where it no longer works with the moment object. The error is slightly different, however: TypeError: value.split is not a function. For now I will just use version 2.4.0 |
It would be great if you could create a stackblitz with your configuration. |
https://ionic-8csbwc.stackblitz.io/ The error will show in console. It appears to still work somewhat on stackblitz but when running from ionic serve it brings the error window up and then doesn't function properly. |
@cyates81 can u please share the link to stackblitz editor instead of the preview? |
As a workaround I suggest to do as follows https://stackblitz.com/edit/ionic-qa1cjj I will mark it as bug, I hope I will have the time to address this issue in the next few days. |
fixed, will be available in version 2.7.5 |
Much appreciated! |
* fixing #340 (#341) * updating change log * fixing changelog * testing new build (#351) * version bump * fixing issue #355 (#356) * resolving conflict * fixing 359 * Adding documentation for * fixing changelog * fixing build * version bump * hideOnOutsideClick added (#363) * removing redundant import * closing 367 * fixing change log * resolving moment value in Reactive forms (#372) * updating changelog * updating changelog
* fixing #340 (#341) * updating change log * fixing changelog * testing new build (#351) * version bump * fixing issue #355 (#356) * resolving conflict * fixing 359 * Adding documentation for * fixing changelog * fixing build * version bump * hideOnOutsideClick added (#363) * removing redundant import * closing 367 * fixing change log * resolving moment value in Reactive forms (#372) * updating changelog * updating changelog * fixing merge + resolving 389 * moving to node 8 * adding documentation * xit flappy test * moving more test to xit
Hello,
I am using Angular 5, moment 2.20.1, Chrome 64, Mac High Sierra. I updated to version 2.7.4 and now I get the following stack trace:
Uncaught (in promise): TypeError: (value || "").split is not a function
TypeError: (value || "").split is not a function
at UtilsService.datesStringToStringArray (http://localhost:8100/build/vendor.js:44895:30)
at DatePickerService.isValidInputDateValue (http://localhost:8100/build/vendor.js:211582:45)
at DatePickerComponent.onViewDateChange (http://localhost:8100/build/vendor.js:92223:35)
at http://localhost:8100/build/vendor.js:129065:34
at SafeSubscriber.schedulerFn [as _next] (http://localhost:8100/build/vendor.js:4586:36)
at SafeSubscriber.__tryOrUnsub (http://localhost:8100/build/vendor.js:63973:16)
at SafeSubscriber.next (http://localhost:8100/build/vendor.js:63920:22)
at Subscriber._next (http://localhost:8100/build/vendor.js:63860:26)
at Subscriber.next (http://localhost:8100/build/vendor.js:63824:18)
at EventEmitter.Subject.next (http://localhost:8100/build/vendor.js:64060:25)
The only way I can prevent this is to bind to a string which is not ideal. Thanks for your help.
The text was updated successfully, but these errors were encountered: