Skip to content

Commit 9f942b8

Browse files
committed
fix cssPath reactivity issue
1 parent 434a238 commit 9f942b8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/plugin/VCodeBlock.vue

+3-6
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ const renderedCode = ref('');
184184
const runTextValue = ref<string>('');
185185
const useTheme = ref<boolean | string>('');
186186
187-
const { copyButton, copyIcons, copyTab, cssPath, label, runTab, tabs } = toRefs(settings.value);
187+
const { copyButton, copyIcons, copyTab, label, runTab, tabs } = toRefs(settings.value);
188188
189189
190190
// -------------------------------------------------- Computed //
@@ -297,10 +297,7 @@ watch(props as Props, () => {
297297
if (settings.value.runText) {
298298
runTextValue.value = settings.value.runText;
299299
}
300-
});
301300
302-
watch(() => cssPath, () => {
303-
loadTheme();
304301
});
305302
306303
@@ -438,8 +435,8 @@ function loadTheme(): void {
438435
439436
const adjustCssFilename = themeNameAdjustments(activeLibrary, useTheme.value);
440437
441-
if (typeof cssPath.value !== 'undefined') {
442-
fetchUrl = cssPath.value;
438+
if (typeof settings.value.cssPath !== 'undefined') {
439+
fetchUrl = settings.value.cssPath;
443440
}
444441
else {
445442
switch (activeLibrary) {

0 commit comments

Comments
 (0)