mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-20 21:05:45 +01:00
Use Object.defineProperty instead of __defineGetter__/__defineSetter__
In Firefox 48+, the __defineSetter__/__defineSetter__ is deprecated, so use Object.defineProperty instead.
This commit is contained in:
@@ -886,8 +886,11 @@ unlet s:cpo_save
|
||||
sep = sep || " ";
|
||||
let width = 0;
|
||||
let lines = [];
|
||||
lines.__defineGetter__("last", function () {
|
||||
return this[this.length - 1];
|
||||
Object.defineProperty(lines, "last", {
|
||||
get() {
|
||||
return this[this.length - 1];
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
|
||||
for (let item of values(items.array || items)) {
|
||||
|
||||
Reference in New Issue
Block a user