Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var outGlobal = out.global;
var serializedGlobals = getSerializedGlobals(outGlobal);
if (serializedGlobals === undefined) {
return;
}
var cspNonce = outGlobal.cspNonce;
var runtimeId = outGlobal.runtimeId;
var nonceAttr = cspNonce ? " nonce=" + JSON.stringify(cspNonce) : "";
out.write(
"$" +
runtimeId +
"G=" +
warp10
.stringify(serializedGlobals)
.replace(escapeEndingScriptTagRegExp, "\\u003C/") +
""
);
};
var renderedComponents = getRenderedComponents(fromOut, shouldIncludeAll);
if (renderedComponents === undefined) {
return "";
}
var outGlobal = targetOut.global;
var runtimeId = outGlobal.runtimeId;
var componentGlobalKey =
"$" + (runtimeId === "M" ? "components" : runtimeId + "_components");
return (
componentGlobalKey +
"=(window." +
componentGlobalKey +
"||[]).concat(" +
safeJSON(warp10.stringify(renderedComponents)) +
")||" +
componentGlobalKey
);
};