Skip to content
Myr

Corrected callback crashing app when array

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jenkins · committed by Jenkins · parent 2fe46b3 · Browse files · 1 file+1 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:lib/response.js+1 added
232 unmodified lines
233 this.set('Content-Type', 'application/json');234235 // jsonp236 if (callback) {237 if (callback instanceof Array) callback = callback[0];238 this.set('Content-Type', 'text/javascript');239 var cb = callback.replace(/[^\[\]\w$.]/g, '');240 body = cb + ' && ' + cb + '(' + body + ');';241 }
517 unmodified lines