Skip to content

Commit 55f0aa1

Browse files
author
Guillaume Chau
committed
Fix rebase
1 parent a066a5e commit 55f0aa1

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

src/devtools/views/components/ComponentInspector.vue

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,27 +101,25 @@ export default {
101101
const file = this.target.file
102102
// Console display
103103
const fileName = file.replace(/\\/g, '\\\\')
104-
if (file) {
105-
const src = `fetch('/__open-in-editor?file=${encodeURI(file)}').then(response => {
106-
if (response.ok) {
107-
console.log('File ${fileName} opened in editor')
104+
const src = `fetch('/__open-in-editor?file=${encodeURI(file)}').then(response => {
105+
if (response.ok) {
106+
console.log('File ${fileName} opened in editor')
107+
} else {
108+
const msg = 'Opening component ${fileName} failed'
109+
if (__VUE_DEVTOOLS_TOAST__) {
110+
__VUE_DEVTOOLS_TOAST__(msg, 'error')
108111
} else {
109-
const msg = 'Opening component ${fileName} failed'
110-
if (__VUE_DEVTOOLS_TOAST__) {
111-
__VUE_DEVTOOLS_TOAST__(msg, 'error')
112-
} else {
113-
console.log('%c' + msg, 'color:red')
114-
}
115-
console.log('Check the setup of your project, see https://github.com/vuejs/vue-devtools/blob/master/docs/open-in-editor.md')
112+
console.log('%c' + msg, 'color:red')
116113
}
117114
console.log('Check the setup of your project, see https://github.com/vuejs/vue-devtools/blob/master/docs/open-in-editor.md')
118-
})`
119-
if (this.$isChrome) {
120-
chrome.devtools.inspectedWindow.eval(src)
121-
} else {
122-
// eslint-disable-next-line no-eval
123-
eval(src)
124115
}
116+
console.log('Check the setup of your project, see https://github.com/vuejs/vue-devtools/blob/master/docs/open-in-editor.md')
117+
})`
118+
if (this.$isChrome) {
119+
chrome.devtools.inspectedWindow.eval(src)
120+
} else {
121+
// eslint-disable-next-line no-eval
122+
eval(src)
125123
}
126124
}
127125
}

0 commit comments

Comments
 (0)