cm-chessboard 4.5.7 → 4.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -489,6 +489,7 @@ export class Svg {
|
|
|
489
489
|
* @param parent
|
|
490
490
|
* @param name
|
|
491
491
|
* @param attributes
|
|
492
|
+
* @param sibling
|
|
492
493
|
* @returns {Element}
|
|
493
494
|
*/
|
|
494
495
|
static addElement(parent, name, attributes, sibling = undefined) {
|
|
@@ -519,7 +520,11 @@ export class Svg {
|
|
|
519
520
|
* @param element
|
|
520
521
|
*/
|
|
521
522
|
static removeElement(element) {
|
|
522
|
-
element.parentNode
|
|
523
|
+
if(element.parentNode) {
|
|
524
|
+
element.parentNode.removeChild(element)
|
|
525
|
+
} else {
|
|
526
|
+
console.warn(element, "without parentNode")
|
|
527
|
+
}
|
|
523
528
|
}
|
|
524
529
|
|
|
525
530
|
}
|