Commit 334718a3 authored by chandi's avatar chandi Committed by Matthias Larisch

convert NodeList, which is broken on iOS 9, into Arrays
parent 4c0b3afe
Pipeline #48483431 passed with stages
in 16 minutes and 18 seconds
......@@ -31,6 +31,10 @@ export function vueRegister (components) {
export function vueApply (selector) {
let elements = document.querySelectorAll(selector)
// querySelectorAll().forEach() is broken in iOS 9
elements = Array.from(elements)
if (!elements.length) {
throw new Error(`vueUse-Error: no elements were found with selector '${selector}'`)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment