Broadway
Broadway copied to clipboard
Uncaught TypeError: Cannot read property 'slice' of null
Try to use this, but I'm getting Uncaught TypeError: Cannot read property 'slice' of null
from var parsed = jsfunc.toString().match(sourceRegex).slice(1);
in Decoder.js. Any idea what's going on? Any help would be much appreciated.
same problem here
does the problem ocur on the demo page linked on the main page?
no, there it works. in my setup I am loading the decoder through webpack, so there is a chance that somehow there is mangeling by webpack/babel that introduces the problem.
do you have any hints?
the whole problem seems to be related to the module format and bundling. this is how i could use the Decoder in an ES6/webpack app:
- install npm package (broadwayjs) - does not work out of the box.
- patch node_modules/broadwayjs/Player/Decoder.js (replace
var Decoder
in first line byexport default
)
i am aware that this is not a sustainable way of doing it..