Skip to content

Commit 1ca6ba3

Browse files
committed
fix: windows device license file parse fail
1 parent 1aeb409 commit 1ca6ba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src-node/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ async function isLicensedDevice() {
354354
const targetPath = getLicensePath();
355355
try {
356356
const data = await readFileUtf8(targetPath);
357-
JSON.parse(data);
357+
JSON.parse(data.trim());
358358
return true; // currently, the existence of the file itself is flag. in future, we may choose to add more.
359359
} catch {
360360
// file missing, unreadable, or invalid JSON

0 commit comments

Comments
 (0)