Skip to content

Commit bd43b76

Browse files
authored
Merge pull request #4 from voidvoxel/main
v0.5.1
2 parents 81d1446 + 5d423d4 commit bd43b76

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

bin/zerda.mjs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,13 @@ async function main () {
318318
}
319319

320320
// Parse the line as a JSON array.
321-
let input = JSON.parse(inputString);
321+
let input;
322+
323+
try {
324+
input = JSON.parse(inputString);
325+
} catch {
326+
input = inputString;
327+
}
322328

323329
// If this is a single object, add it to an array.
324330
if (typeof input[0] === 'undefined') {
@@ -353,7 +359,13 @@ async function main () {
353359
}
354360

355361
// Parse the line as a JSON array.
356-
let input = JSON.parse(inputString);
362+
let input;
363+
364+
try {
365+
input = JSON.parse(inputString);
366+
} catch {
367+
input = inputString;
368+
}
357369

358370
// If this is a single object, add it to an array.
359371
if (typeof input[0] === 'undefined') {

npm-shrinkwrap.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zerda.js/runtime",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Zerda.js Runtime Environment | Cross-platform | Modular | Wide GPU support",
55
"main": "src/index.mjs",
66
"type": "module",

0 commit comments

Comments
 (0)