We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10fbddf commit b84d744Copy full SHA for b84d744
packages/vue/src/dotlottie.ts
@@ -239,12 +239,13 @@ export const DotLottieVue = defineComponent({
239
watch(
240
() => data?.value,
241
(newVal) => {
242
- if (dotLottie && typeof newVal !== 'object' && typeof newVal !== 'string') {
243
- return;
+ const isStrOrObject = typeof newVal === 'object' || typeof newVal === 'string';
+
244
+ if (dotLottie && isStrOrObject) {
245
+ load({
246
+ data: newVal,
247
+ });
248
}
- load({
- data: newVal,
- });
249
},
250
{ deep: true },
251
);
0 commit comments