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

TypeError: e.split is not a function #15

Open
jagthedrummer opened this issue Mar 6, 2020 · 2 comments
Open

TypeError: e.split is not a function #15

jagthedrummer opened this issue Mar 6, 2020 · 2 comments

Comments

@jagthedrummer
Copy link

Every once in a while when I hit the "save" button on a form containing an ember-simplemde instance I get an error in the console that says TypeError: e.split is not a function and then the contents of the editor becomes [object Object].

Before the TypeError: I usually also see Assertion failed: Input argument is not an HTMLInputElement but I see that at other times even when the [object Object] problem does not happen, so I'm not sure if that's related or not.

Screen Shot 2020-03-05 at 10 12 23 PM

So far I haven't been able to nail down any solid repro steps, it just seems to happen randomly. I'm hoping someone might have ideas on where I should be looking to nail down what's happening.

@marceloandrader
Copy link
Member

Hey, the only e.split call in the code is in the unpackToolbarOptions that is called by buildSimpleMDEOptions during didInsertElement maybe there is an error there that is not being managed. I see that we only use that function if the var is string

all of this is in addon/components/simple-mde.js

Is it possible that you are changing the options from the component at runtime?

@lindyhopchris
Copy link

I'm also seeing this in tests when using fillIn('textarea', 'My value'). As per the trace above, the e.split error is originating from within simplemde.min.js. I'm not setting any options on my component so don't think it's related to that.

I've encountered this when upgrading my Ember app from 2.18 to 3.19. The tests passed fine on 2.18 - so not sure if you'd encounter it if the addon was upgraded to latest Ember version?

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

3 participants