MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / destroyPreview

Function destroyPreview

src/pages/themeSetting/themeSetting.js:38–47  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

36 const previewDoc = `// Acode is awesome!\nconst message = "Welcome to Acode";\nconsole.log(message);`;
37
38 function destroyPreview(context) {
39 if (!cmPreview) return;
40 try {
41 cmPreview.destroy();
42 } catch (error) {
43 console.warn(`Failed to destroy theme preview (${context}).`, error);
44 } finally {
45 cmPreview = null;
46 }
47 }
48
49 function createPreview(themeId) {
50 destroyPreview("create");

Callers 4

createPreviewFunction · 0.85
themeSetting.jsFile · 0.85
renderAppThemesFunction · 0.85
renderTerminalThemesFunction · 0.85

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected