mpejs
mpejs copied to clipboard
[].concat is not a function
Getting this if I trigger loads of notes in my application. Not sure if it's app specific. I suspect the stack trace does not tell the full story.
index.js:1543 Uncaught TypeError: [].concat is not a function
at eval (webpack:///./~/mpe/lib/index.js?:1543:23)
at Array.forEach (native)
at activeNotes (webpack:///./~/mpe/lib/index.js?:1542:22)
at combination (webpack:///./~/mpe/lib/index.js?:880:30)
at dispatch (webpack:///./~/mpe/lib/index.js?:478:23)
at Array.forEach (native)
at Object.processMidiMessage (webpack:///./~/mpe/lib/index.js?:168:14)
at MIDIInput.input.onmidimessage (webpack:///./src/midi/handleInput.ts?:55:40)
The code in question:

Could this be TypeScript related? I some issues over on their project about the type signature for [].concat. The only other possibilities I see are: some other code overriding the Array prototype, or that the error message is just misleading.
Type signatures don't affect anything at runtime, they're just used for checking at compile time. It could be Typescript doing some dodgy transpilation although generally it is quite light on the transpilation. Could be a Babel thing. Could be magic. Not to worry!
On 8 February 2017 at 12:59, Oscar Dub [email protected] wrote:
Could this be TypeScript related? I some issues over on their project about the type signature for [].concat. The only other possibilities I see are: some other code overriding the Array prototype, or that the error message is just misleading.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WeAreROLI/mpejs/issues/30#issuecomment-278322408, or mute the thread https://github.com/notifications/unsubscribe-auth/AFNIlh5BkVfyRbAbxD7x7_IC9mc9PH4Hks5rabw6gaJpZM4L5dMt .
--
----
ROLI extends the joy of music creation to everyone through products like NOISE https://itunes.apple.com/app/noise-5d/id1011132019?ls=1&mt=8, a free music app that lets you make music in minutes. You can go even further with BLOCKS http://www.roli.com/blocks, the modular music-making gift of the year, now available at ROLI.com http://roli.com/, Apple.com http://apple.com/ and Apple Stores worldwide. Office: +44 (0) 207 254 2155
ROLI
2 Glebe Road
London
E8 4BD
ROLI Ltd. is a registered company in England and Wales, and this e-mail and its attachment(s) are intended for the above named only and are confidential. If they have come to you in error then you must take no action based upon them but contact us immediately. Any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Although this e-mail and its attachments are believed to be free of any virus, it is the responsibility of the recipient to ensure that they are virus free. If you contact us by e-mail then we will store your name and address to facilitate communications. Any statements contained herein are those of the individual and not the organisation.