Skip to content

Commit 356815a

Browse files
author
Ives van Hoorne
committed
Fix prettifying for json
1 parent 3034112 commit 356815a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/app/src/app/utils/prettify.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ function getMode(title: string) {
1515
return 'typescript';
1616
}
1717

18-
if (/\.json$/.test(title)) {
19-
return 'babylon';
20-
}
21-
2218
if (/\.css$/.test(title)) {
2319
return 'postcss';
2420
}
@@ -132,7 +128,7 @@ export default function prettify(
132128

133129
return new Promise((resolve, reject) => {
134130
if (!mode) {
135-
reject({ error: 'No mode found for prettify' });
131+
resolve(getCode());
136132
return;
137133
}
138134

0 commit comments

Comments
 (0)