P01yH3dr0n commited on
Commit
3dc3358
1 Parent(s): cb7ba0d

Update tagcomplete/javascript/_utils.js

Browse files
Files changed (1) hide show
  1. tagcomplete/javascript/_utils.js +6 -4
tagcomplete/javascript/_utils.js CHANGED
@@ -55,12 +55,14 @@ async function readFile(filePath, json = false) {
55
  }
56
 
57
  if (json) {
58
- localStorage.setItem(filePath, response.json());
59
- return await response.json();
 
60
  }
61
  else {
62
- localStorage.setItem(filePath, response.text());
63
- return await response.text();
 
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