Skip to content

Commit 3076b59

Browse files
committed
fix(App): fix persistent loading message in compiled code viewer
1 parent e14dcce commit 3076b59

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/livecodes/core.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,9 @@ const getResultPage = async ({
10701070
result: cleanResultFromDev(result),
10711071
styleOnlyUpdate,
10721072
});
1073+
updateCache('markup', markupLanguage, compiledMarkup);
1074+
updateCache('style', styleLanguage, compiledStyle);
1075+
updateCache('script', scriptLanguage, compiledScript);
10731076

10741077
if (broadcastInfo.isBroadcasting) {
10751078
broadcast();
@@ -1124,17 +1127,9 @@ const flushResult = () => {
11241127
wat: ';; loading',
11251128
};
11261129

1127-
updateCache(
1128-
'markup',
1129-
compiledLanguages.markup,
1130-
loadingComments[compiledLanguages.markup] || 'html',
1131-
);
1132-
updateCache('style', compiledLanguages.style, loadingComments[compiledLanguages.style] || 'css');
1133-
updateCache(
1134-
'script',
1135-
compiledLanguages.script,
1136-
loadingComments[compiledLanguages.script] || 'javascript',
1137-
);
1130+
updateCache('markup', compiledLanguages.markup, loadingComments[compiledLanguages.markup] ?? '');
1131+
updateCache('style', compiledLanguages.style, loadingComments[compiledLanguages.style] ?? '');
1132+
updateCache('script', compiledLanguages.script, loadingComments[compiledLanguages.script] ?? '');
11381133
setCache({
11391134
...getCache(),
11401135
tests: {

0 commit comments

Comments
 (0)