Skip to content

Commit

Permalink
fix(events): Fixed some bugs with events
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Aug 23, 2018
1 parent 0de26ca commit 06ba23e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion poc/common/virtual-webaudio.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const applyEventToContext = curry(({ targetId, eventName, param, time, args }, c
break
case EVENTS.UPDATE: {
const node = getNodeById(targetId, ctx)
const [key, value] = toPairs(args)[0]
const [key, value] = toPairs(args[0])[0]

node[key].value = value
}
Expand Down Expand Up @@ -102,7 +102,7 @@ const applyEventToContext = curry(({ targetId, eventName, param, time, args }, c
case 'start':
case 'stop':
case 'setPeriodicWave':
apply(node[param], args)
apply(node[param].bind(node), args)
break
default: {
console.error('unknown command', param)
Expand Down

0 comments on commit 06ba23e

Please sign in to comment.