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

Undefined is not a function - .match() #28

Open
Kikketer opened this issue Jul 22, 2015 · 0 comments
Open

Undefined is not a function - .match() #28

Kikketer opened this issue Jul 22, 2015 · 0 comments
Labels

Comments

@Kikketer
Copy link

On line 222 of your plugins file (or line 183:50 in the generated js file) the .match() was complaining that it didn't exist. I did a simple console out of the opts.content, and it appeared to be HTML.

I fixed the issue by adding a .toString()

partialContainers = (opts.content || '').toString().match(partialContainerRegex) || [];

I assume this shouldn't need to happen and maybe I'm doing something wrong. But this error flew the instant I added this plugin (before I even had anything else setup).

thehuijb added a commit to thehuijb/docpad-plugin-partials that referenced this issue Oct 23, 2015
check if opts.content is of type string before calling .match on it to prevent errors
@mikeumus mikeumus added the bug label Apr 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants