sorry-app / status-bar

Display your Sorry™ status updates on your website and helpdesk.
https://www.sorryapp.com/notifications/
Apache License 2.0
10 stars 4 forks source link

Initialisation fails when Page ID is numeric #62

Closed SirRawlins closed 5 years ago

SirRawlins commented 5 years ago

Contacted by a customer today who was receiving an error when installing the plugin on to their site.

Uncaught TypeError: t.split is not a function at Function.s.fn.statusBar.setup (status-bar.js:29250) at status-bar.js:29278 at dispatch (status-bar.js:11007) at g.handle (status-bar.js:10815) at e (status-bar.js:21662)

Digging into the error in the initial conversation, it seems that by random bad luck their Page ID is 100% numeric, with no letters in it. This results in pages.split() erroring, as it's an integer and not a string.