feat(core): 将goog.get接口调整为goog.readJsonSync以指示其同步操作特性
This commit is contained in:
@@ -49,8 +49,8 @@ class microbitFsWrapper {
|
||||
* initial main.py
|
||||
*/
|
||||
setupFilesystem(folderPath) {
|
||||
const uPyV1 = goog.get(path.join(folderPath, 'microbit-micropython-v1.hex'));
|
||||
const uPyV2 = goog.get(path.join(folderPath, 'microbit-micropython-v2.hex'));
|
||||
const uPyV1 = goog.readFileSync(path.join(folderPath, 'microbit-micropython-v1.hex'));
|
||||
const uPyV2 = goog.readFileSync(path.join(folderPath, 'microbit-micropython-v2.hex'));
|
||||
if (!uPyV1 || !uPyV2) {
|
||||
console.error('There was an issue loading the MicroPython Hex files.');
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ const { Msg, Env } = Mixly;
|
||||
|
||||
if (['zh-hans', 'zh-hant'].includes(Msg.nowLang)) {
|
||||
const i18nFilePath = path.join(Env.templatePath, `json/monaco.i18n.${Msg.nowLang}.json`);
|
||||
window.monacoI18N = goog.getJSON(i18nFilePath);
|
||||
window.monacoI18N = goog.readJsonSync(i18nFilePath);
|
||||
} else {
|
||||
window.monacoI18N = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user