From fc492613ed1ade71c2bd918994c19dda9cae2bc3 Mon Sep 17 00:00:00 2001 From: Chris Fritz Date: Tue, 31 Jul 2018 13:12:01 +0200 Subject: [PATCH] only open file if it's a full path --- src/devtools/views/components/ComponentInspector.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/devtools/views/components/ComponentInspector.vue b/src/devtools/views/components/ComponentInspector.vue index e31e12afa..2d91ff214 100644 --- a/src/devtools/views/components/ComponentInspector.vue +++ b/src/devtools/views/components/ComponentInspector.vue @@ -26,8 +26,8 @@ Inspect DOM @@ -100,6 +100,12 @@ export default { [el.key]: el.value }, this.filter) })), 'type') + }, + + // Checks if the file is actually a path (e.g. '/path/to/file.vue'), or + // only the basename of a pre-compiled 3rd-party component (e.g. 'file.vue') + fileIsPath () { + return this.target.file && /[/\\]/.test(this.target.file) } },