Commit 46f4b099 by Owen Ryan Ang

Fixed error on generating fields on reload

parent c50eb5ee
...@@ -49,8 +49,10 @@ export async function generateFields(inputSchema, containerId) { ...@@ -49,8 +49,10 @@ export async function generateFields(inputSchema, containerId) {
let doctype = sessionStorage.getItem('doctype'); let doctype = sessionStorage.getItem('doctype');
let section = sessionStorage.getItem('section'); let section = sessionStorage.getItem('section');
console.log('doctype:', typeof doctype);
console.log('section:', typeof doctype);
if (doctype == null && section == null) { if ((doctype === null || doctype === "undefined") && (section === null || section === "undefined")) {
Object.keys(schema).every(function (key) { Object.keys(schema).every(function (key) {
let doctypes = schema[key]; let doctypes = schema[key];
let underscoredKey = key.replaceAll(" ", "_"); let underscoredKey = key.replaceAll(" ", "_");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment