Skip to content

Commit

Permalink
fix(v-font): fix font active remove by update
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed May 2, 2024
1 parent c3364b3 commit 7aa02b6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/runtime/directives/vFont.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export default {
const rootSelector = fontCollection.add(definitions);
el.setAttribute(rootSelector.name, rootSelector.value);
binding.instance.fontsReady.set(el, isCritical);
vnode.fontActive = isCritical;

if (isCritical) {
if (typeof vnode.props?.class === 'string') {
vnode.props.class = [
Expand Down Expand Up @@ -98,7 +96,7 @@ async function activateFonts(el, binding, scope) {
);

el.classList.add(CLASS_FONT_ACTIVE);
binding.instance.fontActive = true;
binding.instance.fontsReady.set(el, true);

emit(scope.props, 'onLoad:font', fonts);
}
Expand Down

0 comments on commit 7aa02b6

Please sign in to comment.