@use-stall/core 0.0.15 → 0.1.0
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/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -319,7 +319,9 @@ var is_syncing = false;
|
|
|
319
319
|
var replace_temporary_ids = async (props) => {
|
|
320
320
|
const { table, stall_offline_id, connector_id } = props;
|
|
321
321
|
try {
|
|
322
|
-
const existing = await local_db[table].
|
|
322
|
+
const existing = await local_db[table].filter(
|
|
323
|
+
(record) => record.metadata?.stall_offline_id === stall_offline_id || record?.stall_offline_id === stall_offline_id
|
|
324
|
+
).first();
|
|
323
325
|
if (existing) {
|
|
324
326
|
await local_db[table].update(existing.id, {
|
|
325
327
|
id: connector_id
|
package/dist/index.mjs
CHANGED
|
@@ -252,7 +252,9 @@ var is_syncing = false;
|
|
|
252
252
|
var replace_temporary_ids = async (props) => {
|
|
253
253
|
const { table, stall_offline_id, connector_id } = props;
|
|
254
254
|
try {
|
|
255
|
-
const existing = await local_db[table].
|
|
255
|
+
const existing = await local_db[table].filter(
|
|
256
|
+
(record) => record.metadata?.stall_offline_id === stall_offline_id || record?.stall_offline_id === stall_offline_id
|
|
257
|
+
).first();
|
|
256
258
|
if (existing) {
|
|
257
259
|
await local_db[table].update(existing.id, {
|
|
258
260
|
id: connector_id
|