@saltcorn/mobile-app 0.8.6-beta.15 → 0.8.6-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/www/index.html +1 -0
- package/www/js/utils/table_utils.js +4 -1
package/package.json
CHANGED
package/www/index.html
CHANGED
|
@@ -179,6 +179,7 @@
|
|
|
179
179
|
|
|
180
180
|
// the app comes back from background
|
|
181
181
|
const onResume = async () => {
|
|
182
|
+
if (!saltcorn?.data?.state) return;
|
|
182
183
|
const state = saltcorn.data.state.getState();
|
|
183
184
|
const mobileConfig = state.mobileConfig;
|
|
184
185
|
if (mobileConfig?.allowOfflineMode) {
|
|
@@ -34,7 +34,10 @@ async function updateScTables(tablesJSON, skipScPlugins = true) {
|
|
|
34
34
|
// pick fields that really exist
|
|
35
35
|
const insertRow = {};
|
|
36
36
|
for (const safeField of existingFields) {
|
|
37
|
-
|
|
37
|
+
const fromRow = row[safeField];
|
|
38
|
+
if (fromRow !== null && fromRow !== undefined) {
|
|
39
|
+
insertRow[safeField] = fromRow;
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
42
|
await saltcorn.data.db.insert(table, insertRow);
|
|
40
43
|
}
|