refs #99, check for a valid sourceId on error
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -192,7 +192,7 @@ phantom.loadCasper = function loadCasper() { | ... | @@ -192,7 +192,7 @@ phantom.loadCasper = function loadCasper() { |
192 | * @param Function callback An optional callback | 192 | * @param Function callback An optional callback |
193 | */ | 193 | */ |
194 | phantom.processScriptError = function processScriptError(error, file, callback) { | 194 | phantom.processScriptError = function processScriptError(error, file, callback) { |
195 | if (!this.sourceIds.hasOwnProperty(error.sourceId)) { | 195 | if (error.sourceId && !this.sourceIds.hasOwnProperty(error.sourceId)) { |
196 | this.sourceIds[error.sourceId] = file; | 196 | this.sourceIds[error.sourceId] = file; |
197 | } | 197 | } |
198 | if (error.message === "__sourceId__") { | 198 | if (error.message === "__sourceId__") { | ... | ... |
-
Please register or sign in to post a comment