Skip to content

Commit

Permalink
fix: pass args
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 8, 2019
1 parent ef4d728 commit 2248bf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ exports.createBundleRunner = function createBundleRunner(
// new context mode: creates a fresh context and re-evaluate the bundle
// on each render. Ensures entire application state is fresh for each
// render, but incurs extra evaluation cost.
return (userContext = {}) =>
return (...args) =>
new Promise(resolve => {
userContext._registeredComponents = new Set()
const res = evaluate(entry, createSandbox(userContext))
resolve(typeof res === 'function' ? res(userContext) : res)
const res = evaluate(entry, createSandbox())
resolve(typeof res === 'function' ? res(...args) : res)
})
} else {
// direct mode: instead of re-evaluating the whole bundle on
Expand Down

0 comments on commit 2248bf8

Please sign in to comment.