mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-14 06:45:51 +01:00
Clone arrays assigned to "live" properties, partially to deal with issues with horrid Sandbox proxies and partly for other somewhat obvious reasons.
This commit is contained in:
@@ -21,6 +21,8 @@ Sheet.liveProperty = function (name) {
|
||||
let i = this.prototype.members[name];
|
||||
this.prototype.__defineGetter__(name, function () this[i]);
|
||||
this.prototype.__defineSetter__(name, function (val) {
|
||||
if (isArray(val))
|
||||
val = Array.slice(val);
|
||||
if (isArray(val) && Object.freeze)
|
||||
Object.freeze(val);
|
||||
this[i] = val;
|
||||
|
||||
Reference in New Issue
Block a user