]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
dx(runtime-core): add selector in mount warning (#2563)
authorCédric Exbrayat <cexbrayat@users.noreply.github.com>
Fri, 4 Dec 2020 23:25:13 +0000 (00:25 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Dec 2020 23:25:13 +0000 (18:25 -0500)
packages/runtime-dom/src/index.ts
packages/vue/__tests__/index.spec.ts

index e5335238e90e4ee05f006ce38b0a657058a23f0f..0dfe9fba003e9b61d8002c0ba20577c4f715de4e 100644 (file)
@@ -111,7 +111,9 @@ function normalizeContainer(
   if (isString(container)) {
     const res = document.querySelector(container)
     if (__DEV__ && !res) {
-      warn(`Failed to mount app: mount target selector returned null.`)
+      warn(
+        `Failed to mount app: mount target selector "${container}" returned null.`
+      )
     }
     return res
   }
index ae1f35bc259aa68741fc8841e04f0aeef06b0313..b425e5de7aea342086a5489d5d63746a85f64dc8 100644 (file)
@@ -205,7 +205,7 @@ describe('compiler + runtime integration', () => {
     createApp(App).mount('#not-exist-id')
 
     expect(
-      '[Vue warn]: Failed to mount app: mount target selector returned null.'
+      '[Vue warn]: Failed to mount app: mount target selector "#not-exist-id" returned null.'
     ).toHaveBeenWarned()
     document.querySelector = origin
   })