Skip to content
Snippets Groups Projects
Commit 50d1bbe6 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'warning-rules-assistant' into 'pregmod-master'

Fix for null objects in read only

See merge request !5516
parents 7c16e933 e984889a
No related branches found
No related tags found
1 merge request!5516Fix for null objects in read only
window.createReadonlyProxy = function(target) { window.createReadonlyProxy = function(target) {
if (target == null) return target; //intentionally ==
if (target.__isReadonlyProxy) { return target; } if (target.__isReadonlyProxy) { return target; }
if (_.isArray(target)) { if (_.isArray(target)) {
return new Proxy(target, { return new Proxy(target, {
...@@ -39,6 +40,7 @@ window.createReadonlyProxy = function(target) { ...@@ -39,6 +40,7 @@ window.createReadonlyProxy = function(target) {
return target; return target;
}; };
window.createCheatProxy = function(target) { window.createCheatProxy = function(target) {
if (target == null) return target; //intentionally ==
if (target.__isCheatProxy) { return target; } if (target.__isCheatProxy) { return target; }
if (_.isArray(target)) { if (_.isArray(target)) {
return new Proxy(target, { return new Proxy(target, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment