Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

replaceRequireScript with almond fails, if the target HTML file has no doctype defined #59

Closed
kaplas opened this Issue · 2 comments

2 participants

@kaplas

When using almond and trying to replace script tags in an HTML file which has no doctype defined user gets greeted with message

>> TypeError: Cannot read property 'name' of null

The problem seems to be in the getDoctype function in lib/replace.js. Couldn't the function just return an empty string if document.doctype is null?

@asciidisco
Owner

Good catch.
Would you mind to submit a pull request?

@kaplas

I can try; I checked previously that you have quite a good contributing guide, so perhaps I can manage it. Be prepared for some newbie fails though ;)

Ie. I haven't submitted many pull requests before, but if you don't mind a lag of couple of days, I can try make one with tests and everything.

@asciidisco asciidisco was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.