Skip to content
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

str.split is nto a function #3857

Open
4 tasks
scriptsure opened this issue Sep 13, 2023 · 1 comment
Open
4 tasks

str.split is nto a function #3857

scriptsure opened this issue Sep 13, 2023 · 1 comment

Comments

@scriptsure
Copy link

This issue tracker is for Bug Reports and Feature Requests only.

Please direct requests for help to StackOverflow.
See http://bit.ly/UIR-SOF for details.

This is a (check one box):

  • [ x ] Bug Report
  • Feature Request
  • General Query

My version of UI-Router is: (type version) 1.0.30

Bug Report

Current Behavior:

i am not sure why this is getting thrown in random places:

angular.js:15544 TypeError: str.split is not a function
    at splitClasses (stateDirectives.ts:685:47)
    at Array.map (<anonymous>)
    at getClasses (stateDirectives.ts:689:18)
    at update (stateDirectives.ts:692:32)
    at processQueue (angular.js:17922:37)
    at angular.js:17970:27
    at Scope.$digest (angular.js:19089:15)
    at Scope.$apply (angular.js:19477:24)
    at done (angular.js:13320:47)
    at completeRequest (angular.js:13577:7) 'Possibly unhandled rejection: {}'

Is there something that i am missing. We were on a very old beta 1 release of ui-router that never gave us 1 issue. Upon upgrade we started getting these errors on the console, BUT everything seems to still work as designed.

Has anyone every seen this?

General Query

Please direct general implementation questions to StackOverflow:
http://stackoverflow.com/questions/ask?tags=angularjs,angular-ui-router

Please review the Sample Application which highlights common approaches:
https://github.com/ui-router/sample-app-angularjs

  • I have already asked my question on StackOverflow and nobody could answer the question

  • I have already reviewed the sample application for examples of common approaches

  • [ x] I believe my question can only be answered by the UI-Router maintainers

(type general query here)

@omtagline
Copy link

it's because sometime it's not stirng so first use

str.toString().split()

and
and given the error it looks like str is an array make sure before using the split function and if it still gives that error then use the toString() method and try to split

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants