mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 20:34:11 +01:00
Fix base.jsm:deprecated with null filenames. Closes issue #261.
This commit is contained in:
@@ -272,10 +272,10 @@ function deprecated(reason, fn) {
|
||||
let obj = this.className ? this.className + "#" :
|
||||
this.constructor.className ? this.constructor.className + "#" :
|
||||
"";
|
||||
let filename = frame.filename.replace(/.* -> /, "");
|
||||
let filename = (frame.filename || "unknown").replace(/.* -> /, "");
|
||||
if (!set.add(deprecatedMethod.seen, filename))
|
||||
util.dactyl(fn).echoerr(
|
||||
util.urlPath(filename || "unknown") + ":" + frame.lineNumber + ": " +
|
||||
util.urlPath(filename) + ":" + frame.lineNumber + ": " +
|
||||
obj + (fn.name || name) + " is deprecated: " + reason);
|
||||
return func.apply(this, arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user