Skip to content

Commit fd6abb7

Browse files
authored
[BUG]: Fixed utils function parseArray (#13932)
1 parent dea586c commit fd6abb7

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

components/grist/actions/add-records/add-records.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "grist-add-records",
66
name: "Add Records",
77
description: "Appends new records to a chosen table in Grist. [See the documentation](https://support.getgrist.com/api/#tag/records/operation/addRecords)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
app,

components/grist/actions/add-update-records/add-update-records.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "grist-add-update-records",
66
name: "Add Or Update Records",
77
description: "Add records in a specified table or updates existing matching records. [See the documentation](https://support.getgrist.com/api/#tag/records/operation/replaceRecords)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
app,

components/grist/actions/find-records/find-records.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "grist-find-records",
66
name: "Find Records",
77
description: "Searches for records in a specified table. [See the documentation](https://support.getgrist.com/api/#tag/records/operation/listRecords)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
app,

components/grist/common/utils.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { ConfigurationError } from "@pipedream/platform";
22

33
function isJson(value) {
4-
if (typeof(value) !== "string") {
5-
return false;
6-
}
7-
84
try {
95
JSON.parse(value);
106
} catch (e) {
@@ -15,9 +11,14 @@ function isJson(value) {
1511
}
1612

1713
function valueToObject(value) {
14+
if (typeof(value) === "object") {
15+
return value;
16+
}
17+
1818
if (!isJson(value)) {
1919
throw new ConfigurationError(`Make sure the custom expression contains a valid JSON object: ${value}`);
2020
}
21+
2122
return JSON.parse(value);
2223
}
2324

components/grist/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/grist",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Pipedream Grist Components",
55
"main": "grist.app.mjs",
66
"keywords": [
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^1.6.2"
16+
"@pipedream/platform": "^3.0.1"
1717
}
1818
}

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)