Skip to content

Commit

Permalink
feat: check if object is array & if so use it as a ref instead of rea…
Browse files Browse the repository at this point in the history
…ctive (to be able to use watch/watchEffect on it)

EMP-3750
  • Loading branch information
annacv committed Mar 26, 2024
1 parent 25b17c8 commit cdedcde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/x-components/src/composables/use-hybrid-inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const makeInjectionReactive = <SomeValue>(
) {
const xRefValue = injection.value;

if (xRefValue && typeof xRefValue === 'object') {
if (xRefValue && typeof xRefValue === 'object' && !Array.isArray(xRefValue)) {
return reactive(xRefValue);
} else {
return ref<SomeValue>(xRefValue);
Expand Down

0 comments on commit cdedcde

Please sign in to comment.