Skip to content

Commit

Permalink
Added default scope value for exec filter
Browse files Browse the repository at this point in the history
  • Loading branch information
marziply committed Aug 31, 2021
1 parent 8fcfd07 commit 598481e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yankee-doodle",
"version": "2.0.1",
"version": "2.0.2",
"description": "Yank values from a given object via a specified schema",
"author": "marziply [email protected]",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const filters = {
exec ({ node, data, args: [name, ...args] }) {
const fn = data[name] ?? noop

node.options.exec = value => fn.call(value, value, ...args)
node.options.exec = (value = data) => fn.call(value, value, ...args)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/flag.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default class Flag {
constructor (flag) {
this.flag = flag
this.flag = flag ?? null
}

on (flag, callback) {
Expand Down

0 comments on commit 598481e

Please sign in to comment.