Nonexistent plugin check
shshaw opened this issue · comments
From #26
Cannot read property 'depends' of undefined
It looks like React is setting data-splitting to data-splitting="true" instead of leaving it as only the attribute as you have in the JSX. Splitting then looks for a "true" split plugin, which doesn't exist, hence the error! 😀
There should be some better error checking in the plugin detection, which we'll look at for the next release.
So here are some options.
- we can explicitly assume "true" = "". this will fallback to chars. This would be a specific fix for JSX users
- we can throw an error when a plugin is referenced that is not loaded
I think if we do one or both of those, it will make the issue better overall.
I added code to check for the value and to treat both falsy and pluginName === "true" as chars
This fell off my radar and was not in the master branch as I expected. I created #39 to get it into the main branch.
Committed this directly to master