Spaces:
Paused
Paused
P01yH3dr0n
commited on
Commit
•
3dc3358
1
Parent(s):
cb7ba0d
Update tagcomplete/javascript/_utils.js
Browse files
tagcomplete/javascript/_utils.js
CHANGED
@@ -55,12 +55,14 @@ async function readFile(filePath, json = false) {
|
|
55 |
}
|
56 |
|
57 |
if (json) {
|
58 |
-
|
59 |
-
|
|
|
60 |
}
|
61 |
else {
|
62 |
-
|
63 |
-
|
|
|
64 |
}
|
65 |
}
|
66 |
|
|
|
55 |
}
|
56 |
|
57 |
if (json) {
|
58 |
+
let content = await response.json();
|
59 |
+
localStorage.setItem(filePath, content);
|
60 |
+
return content;
|
61 |
}
|
62 |
else {
|
63 |
+
let content = await response.text();
|
64 |
+
localStorage.setItem(filePath, content);
|
65 |
+
return content;
|
66 |
}
|
67 |
}
|
68 |
|