1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 17:39:57 +02:00

fix html-serializer for jsdom use

This commit is contained in:
Ian Storm Taylor
2017-09-28 23:04:34 -07:00
parent c90f5f0825
commit 6d04cae274

View File

@@ -233,9 +233,10 @@ class Html {
}
const next = (elements) => {
if (typeof NodeList !== 'undefined' && elements instanceof NodeList) {
if (Object.prototype.toString.call(elements) == '[object NodeList]') {
elements = Array.from(elements)
}
switch (typeOf(elements)) {
case 'array':
return this.deserializeElements(elements)