Closed
Description
Version
2.6.11
Reproduction link
https://jsfiddle.net/0jh1psog/
Steps to reproduce
Open the console in the provided JSFiddle
or
run Vue.config.getTagNamespace('foreignObject')
What is expected?
Vue.config.getTagNamespace('foreignObject')
should return 'svg'
What is actually happening?
It returns undefined
.
This causes a warning Unknown custom element: <foreignObject>
when testing such components using vue-test-utils
This is caused by
vue/src/platforms/web/util/element.js
Line 29 in 52719cc
It should be
foreignobject
with lowercase o
here, because of the makeMap
implementation.
To avoid such bugs in the future, even better fix:
Line 113 in 6fe07eb
should be
map[expectsLowerCase ? list[i].toLowerCase() : list[i]] = true