mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Panel Plugins: Change array methods from read-only to writable (#71315)
This commit is contained in:
parent
b39c8aec6c
commit
864bf28a55
@ -19,33 +19,33 @@ if (!Object.getOwnPropertyDescriptor(Array.prototype, 'toArray')) {
|
|||||||
value: function (idx: number): any {
|
value: function (idx: number): any {
|
||||||
return (this as any)[idx];
|
return (this as any)[idx];
|
||||||
},
|
},
|
||||||
writable: false,
|
writable: true,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
configurable: false,
|
configurable: true,
|
||||||
},
|
},
|
||||||
set: {
|
set: {
|
||||||
value: function (idx: number, value: any) {
|
value: function (idx: number, value: any) {
|
||||||
(this as any)[idx] = value;
|
(this as any)[idx] = value;
|
||||||
},
|
},
|
||||||
writable: false,
|
writable: true,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
configurable: false,
|
configurable: true,
|
||||||
},
|
},
|
||||||
add: {
|
add: {
|
||||||
value: function (value: any) {
|
value: function (value: any) {
|
||||||
(this as any).push(value);
|
(this as any).push(value);
|
||||||
},
|
},
|
||||||
writable: false,
|
writable: true,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
configurable: false,
|
configurable: true,
|
||||||
},
|
},
|
||||||
toArray: {
|
toArray: {
|
||||||
value: function () {
|
value: function () {
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
writable: false,
|
writable: true,
|
||||||
enumerable: false,
|
enumerable: false,
|
||||||
configurable: false,
|
configurable: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user