mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 18:09:49 +02:00
fix html-serializer for jsdom use
This commit is contained in:
@@ -233,9 +233,10 @@ class Html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const next = (elements) => {
|
const next = (elements) => {
|
||||||
if (typeof NodeList !== 'undefined' && elements instanceof NodeList) {
|
if (Object.prototype.toString.call(elements) == '[object NodeList]') {
|
||||||
elements = Array.from(elements)
|
elements = Array.from(elements)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (typeOf(elements)) {
|
switch (typeOf(elements)) {
|
||||||
case 'array':
|
case 'array':
|
||||||
return this.deserializeElements(elements)
|
return this.deserializeElements(elements)
|
||||||
|
Reference in New Issue
Block a user