Skip to content

Commit

Permalink
Rename replaceChildrenPolyfill to replaceChildrenPonyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Nov 23, 2021
1 parent 9ca2e3f commit 1b0a00b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const SVG_NS = 'http://www.w3.org/2000/svg';

// Taken from https://github.com/yuzhe-han/ParentNode-replaceChildren
// This is to support browsers that do not yet support `replaceChildren`
const replaceChildrenPolyfill = function (...addNodes) {
const replaceChildrenPonyfill = function (...addNodes) {
while (this.lastChild) {
this.removeChild(this.lastChild);
}
Expand Down Expand Up @@ -512,7 +512,7 @@ function createFaceUpdater(container, polygons, transformed) {
if (container.replaceChildren) {
container.replaceChildren(...defs, ...maskChildren, ...newPolygons);
} else {
replaceChildrenPolyfill.bind(container)(
replaceChildrenPonyfill.bind(container)(
...defs,
...maskChildren,
...newPolygons,
Expand Down

0 comments on commit 1b0a00b

Please sign in to comment.