refactor: migrate legacy wire namespace to wrn
This commit is contained in:
+10
-10
@@ -213,33 +213,33 @@ function authClientSource(schemas: AuthSchemaSet): string {
|
||||
(function () {
|
||||
var defaults = ${descriptors};
|
||||
|
||||
window.__wireSchemas =
|
||||
window.__wireSchemas || {};
|
||||
window.__wrnSchemas =
|
||||
window.__wrnSchemas || {};
|
||||
|
||||
Object.keys(defaults).forEach(
|
||||
function (name) {
|
||||
if (!(name in window.__wireSchemas)) {
|
||||
window.__wireSchemas[name] =
|
||||
if (!(name in window.__wrnSchemas)) {
|
||||
window.__wrnSchemas[name] =
|
||||
defaults[name];
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if (
|
||||
window.__wireValidate &&
|
||||
typeof window.__wireValidate
|
||||
window.__wrnValidate &&
|
||||
typeof window.__wrnValidate
|
||||
.registerSchemas === "function"
|
||||
) {
|
||||
window.__wireValidate.registerSchemas(
|
||||
window.__wrnValidate.registerSchemas(
|
||||
defaults,
|
||||
document
|
||||
);
|
||||
} else if (
|
||||
window.__wireValidate &&
|
||||
typeof window.__wireValidate.init ===
|
||||
window.__wrnValidate &&
|
||||
typeof window.__wrnValidate.init ===
|
||||
"function"
|
||||
) {
|
||||
window.__wireValidate.init(document);
|
||||
window.__wrnValidate.init(document);
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user