Skip to content

Commit

Permalink
fix(kit): add null-safety check on process instance props, close #688
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Nov 11, 2024
1 parent 0cf7f09 commit 205bd4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/devtools-kit/src/core/component/state/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function processProps(instance: VueAppInstance) {
const props: InspectorState[] = []
const propDefinitions = instance?.type?.props

for (const key in instance.props) {
for (const key in instance?.props) {
const propDefinition = propDefinitions ? propDefinitions[key] : null
const camelizeKey = camelize(key)
props.push({
Expand Down Expand Up @@ -96,7 +96,7 @@ function processProps(instance: VueAppInstance) {
*/
function processState(instance: VueAppInstance) {
const type = instance.type
const props = type.props
const props = type?.props
const getters
= type.vuex
&& type.vuex.getters
Expand Down

0 comments on commit 205bd4e

Please sign in to comment.