mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-07 12:06:56 +03:00
fix: potential fix of structuredClone for old browsers
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
'require uci';
|
'require uci';
|
||||||
'require ui';
|
'require ui';
|
||||||
|
|
||||||
|
if (typeof structuredClone !== 'function')
|
||||||
|
globalThis.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));
|
||||||
|
|
||||||
export * from './validators';
|
export * from './validators';
|
||||||
export * from './helpers';
|
export * from './helpers';
|
||||||
export * from './podkop';
|
export * from './podkop';
|
||||||
|
|||||||
@@ -4737,6 +4737,10 @@ function insertIf(condition, elements) {
|
|||||||
function insertIfObj(condition, object) {
|
function insertIfObj(condition, object) {
|
||||||
return condition ? object : {};
|
return condition ? object : {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// src/main.ts
|
||||||
|
if (typeof structuredClone !== "function")
|
||||||
|
globalThis.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));
|
||||||
return baseclass.extend({
|
return baseclass.extend({
|
||||||
ALLOWED_WITH_RUSSIA_INSIDE,
|
ALLOWED_WITH_RUSSIA_INSIDE,
|
||||||
BOOTSTRAP_DNS_SERVER_OPTIONS,
|
BOOTSTRAP_DNS_SERVER_OPTIONS,
|
||||||
|
|||||||
Reference in New Issue
Block a user