Since last sunday in my project, when i'm testing it in Chrome or Safari, i get this error when trying to fill some localStorage variables with a StorageModel instance. I get this
NoModelError: Can't found 'undefined' model
When digging down in the error it happens with 3 functions i've created to initialize localStorage. The functions are calling the models as Appery.io standard;
But the model exists (See attached images)
Code: Select all
pfunction initPreliquidacionLocalHistoricoDB(){/p p /p p if((localStorage.preliquidacionesHistoricoLocalDB===null)||typeof localStorage.preliquidacionesHistoricoLocalDB==="undefined" ){/p p var histDB=Apperyio.getModel("PreliquidacionesStore");/p p localStorage.preliquidacionesHistoricoLocalDB=JSON.stringify(histDB);/p p
/p p}/p p
/p p /p p}/p pfunction initPreliquidacionStorage(){/p p /p p var preliquidacionRecord = Apperyio.getModel("Preliquidacion_Model",{});/p p localStorage.preliquidacionRecord = JSON.stringify(preliquidacionRecord);/p p /p p}/p p
/p pfunction initPreliquidacionStorageDB(){/p p /p p var preliquidacionDB= Apperyio.getModel("PreliquidacionesStore");/p p localStorage.preliquidacionesStorageDB = JSON.stringify(preliquidacionDB);/p p /p p}/p