vuejs / devtools-v6

⚙️ Browser devtools extension for debugging Vue.js applications.
https://devtools-v6.vuejs.org/
MIT License
24.68k stars 4.14k forks source link

docs: change variable name in getComponentName code snippet #2121

Closed gino0o0o closed 9 months ago

gino0o0o commented 1 year ago

fix(docs): change variable name in getComponentName code snippet

Change the variable name name to componentName in the getComponentName code snippet.

Description

In the getComponentName documentation, change the name of the variable

api.on.inspectComponent(async payload => {
  if (payload.instanceData) {
    const componentName = await api.getComponentName(payload.componentInstance)
    payload.instanceData.state.push({
      type: stateType,
      key: 'component name',
      value: name -------> changed to componentName
    })
  }
})

Additional context


What is the purpose of this pull request?

Before submitting the PR, please make sure you do the following