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() {
* @param Function callback An optional callback
*/
phantom.processScriptError = function processScriptError(error, file, callback) {
if (!this.sourceIds.hasOwnProperty(error.sourceId)) {
if (error.sourceId && !this.sourceIds.hasOwnProperty(error.sourceId)) {
this.sourceIds[error.sourceId] = file;
}
if (error.message === "__sourceId__") {
......