Skip to content

Commit cfd4a65

Browse files
committed
fix: update method to use object.update etc
1 parent ec4140b commit cfd4a65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async function render({ source, element, selector, data, key, index, currentInde
9191

9292
let type = data.type
9393
if (!type && data.method) {
94-
type = data.method.split('.')[1]
94+
type = data.method.split('.')[0]
9595
} else if (type == 'key')
9696
type = 'object'
9797

@@ -538,7 +538,7 @@ async function renderValue(node, data, placeholder, renderAs, renderedNode) {
538538
try {
539539
let Data = JSON.parse('{' + match[1].replace(/'/g, '"') + '}');
540540
if (Data.storage || Data.database || Data.array || Data.object || Data.index) {
541-
Data.method = 'read.object'
541+
Data.method = 'object.read'
542542
value = await CoCreate.crud.send(Data)
543543
value = value.object[0][Data.key]
544544
}

0 commit comments

Comments
 (0)