Skip to content

Commit

Permalink
fix(vue3): inject value showing default over falsy value (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
psevertson authored Jan 20, 2023
1 parent 11e7e00 commit 0c06c01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app-backend-vue3/src/components/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function processInject (instance, mergedType) {
return keys.map(({ key, originalKey }) => ({
type: 'injected',
key: originalKey && key !== originalKey ? `${originalKey.toString()}${key.toString()}` : key.toString(),
value: returnError(() => instance.ctx[key] || instance.provides[originalKey] || defaultValue),
value: returnError(() => instance.ctx.hasOwnProperty(key) ? instance.ctx[key] : instance.provides.hasOwnProperty(originalKey) ? instance.provides[originalKey] : defaultValue),
}))
}

Expand Down

0 comments on commit 0c06c01

Please sign in to comment.