Skip to content

Commit 9c6e06b

Browse files
bogushevichindutny
authored andcommitted
debugger: Fix bug in sb() with unnamed script
setBreakpoint() cause error when unnamed script is loaded
1 parent f6f176e commit 9c6e06b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/_debugger.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,9 @@ Interface.prototype.setBreakpoint = function(script, line,
13741374
if (script != +script && !this.client.scripts[script]) {
13751375
var scripts = this.client.scripts;
13761376
Object.keys(scripts).forEach(function(id) {
1377-
if (scripts[id] && scripts[id].name.indexOf(script) !== -1) {
1377+
if (scripts[id] &&
1378+
scripts[id].name &&
1379+
scripts[id].name.indexOf(script) !== -1) {
13781380
if (scriptId) {
13791381
ambiguous = true;
13801382
}

0 commit comments

Comments
 (0)