Skip to content

Commit

Permalink
Bundler can't parse multiple exports per module
Browse files Browse the repository at this point in the history
  • Loading branch information
barneycarroll authored and dead-claudia committed Jul 2, 2022
1 parent 28d35b4 commit da76ed9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions render/domFor.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
"use strict"

var delayedRemoval = new WeakMap
module.exports.delayedRemoval = delayedRemoval

module.exports.domFor = function *domFor({dom, domSize}, {generation} = {}) {
function *domFor({dom, domSize}, {generation} = {}) {
if (dom != null) do {
const {nextSibling} = dom

if (delayedRemoval.get(dom) === generation) {
yield dom
domSize--
}

dom = nextSibling
}
while (domSize)
}

module.exports = {
delayedRemoval: delayedRemoval,
domFor: domFor,
}

0 comments on commit da76ed9

Please sign in to comment.