Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes toggling v-show fails with icon and layers text #315

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions index.es.js
Expand Up @@ -458,7 +458,9 @@ var FontAwesomeIcon = defineComponent({
return renderedIcon.value ? convert(renderedIcon.value.abstract[0], {}, attrs) : null;
});
return function () {
return vnode.value;
return h(function () {
return vnode.value;
});
};
}
});
Expand Down Expand Up @@ -538,7 +540,9 @@ var FontAwesomeLayersText = defineComponent({
return convert(abstractElement.value, {}, attrs);
});
return function () {
return vnode.value;
return h(function () {
return vnode.value;
});
};
}
});
Expand Down
8 changes: 6 additions & 2 deletions index.js
Expand Up @@ -461,7 +461,9 @@
return renderedIcon.value ? convert(renderedIcon.value.abstract[0], {}, attrs) : null;
});
return function () {
return vnode.value;
return vue.h(function () {
return vnode.value;
});
};
}
});
Expand Down Expand Up @@ -541,7 +543,9 @@
return convert(abstractElement.value, {}, attrs);
});
return function () {
return vnode.value;
return vue.h(function () {
return vnode.value;
});
};
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/FontAwesomeIcon.js
@@ -1,5 +1,5 @@
import { parse as faParse, icon as faIcon } from '@fortawesome/fontawesome-svg-core'
import { defineComponent, computed, watch } from 'vue'
import { defineComponent, computed, watch, h } from 'vue'
import convert from '../converter'
import log from '../logger'
import { objectWithKey, classList } from '../utils'
Expand Down Expand Up @@ -122,6 +122,6 @@ export default defineComponent({
}, { immediate: true })

const vnode = computed(() => renderedIcon.value ? convert(renderedIcon.value.abstract[0], {}, attrs) : null)
return () => vnode.value
return () => h(() => vnode.value)
}
})
4 changes: 2 additions & 2 deletions src/components/FontAwesomeLayersText.js
@@ -1,5 +1,5 @@
import { config, parse, text } from '@fortawesome/fontawesome-svg-core'
import { defineComponent, computed } from 'vue'
import { defineComponent, computed, h } from 'vue'
import convert from '../converter'
import { objectWithKey } from '../utils'

Expand Down Expand Up @@ -44,6 +44,6 @@ export default defineComponent({
})

const vnode = computed(() => convert(abstractElement.value, {}, attrs))
return () => vnode.value
return () => h(() => vnode.value)
}
})