Commit 8f373880 8f373880ae55415748aa4fd5f152d24c4a42dee5 by Nicolas Perriault

refs #99, check for a valid sourceId on error

1 parent 1cd0afe2
...@@ -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__") {
......