mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-27 12:15:46 +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 + "#" :
|
let obj = this.className ? this.className + "#" :
|
||||||
this.constructor.className ? this.constructor.className + "#" :
|
this.constructor.className ? this.constructor.className + "#" :
|
||||||
"";
|
"";
|
||||||
let filename = frame.filename.replace(/.* -> /, "");
|
let filename = (frame.filename || "unknown").replace(/.* -> /, "");
|
||||||
if (!set.add(deprecatedMethod.seen, filename))
|
if (!set.add(deprecatedMethod.seen, filename))
|
||||||
util.dactyl(fn).echoerr(
|
util.dactyl(fn).echoerr(
|
||||||
util.urlPath(filename || "unknown") + ":" + frame.lineNumber + ": " +
|
util.urlPath(filename) + ":" + frame.lineNumber + ": " +
|
||||||
obj + (fn.name || name) + " is deprecated: " + reason);
|
obj + (fn.name || name) + " is deprecated: " + reason);
|
||||||
return func.apply(this, arguments);
|
return func.apply(this, arguments);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user