Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Uncaught TypeError: t.data.substring is not a function (with solution)

1509739854
Ada L.
Marketplace Creator
Sheet Author
API Scripter
In pretty much all of my games (including brand new games without any character sheets/API scripts attached), I notice that there are several instances of this error in the developer console: app.js?1509570495:41 Uncaught TypeError: t.data.substring is not a function(…)t @ app.js?1509570495:41 Although the error seems benign, it may be worth cleaning up.  After unminifying the code, I tracked it down to a web worker message event handler. The issue could easily be fixed by making sure t.data is a string (e.g. typeof t.data === 'string') before calling t.data.substring() in the handler's else-if conditional. :)
1509740062
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Oh... oops wrong forum. I meant to put this in the Bug Reports and Technical Issues forum.. *'-'*
1509742284
The Aaron
Roll20 Production Team
API Scripter
(Moved)