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

fix(utils/get): handle case where passed object is null (Fixes #2623) #2624

Merged
merged 2 commits into from Feb 18, 2019
Merged
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
7 changes: 6 additions & 1 deletion src/utils/get.js
Expand Up @@ -17,7 +17,12 @@ export default function get(holder, propName) {
let result = holder
let lastPropName

while ((lastPropName = propParts.shift()) !== undefined) {
while (
(lastPropName = propParts.shift()) !== undefined &&
// Fix for https://github.com/bootstrap-vue/bootstrap-vue/issues/2623
result !== undefined &&
result !== null
) {
if (result[lastPropName] === undefined) return undefined
result = result[lastPropName]
}
Expand Down