Skip to content

Commit

Permalink
feat: add path for custom parsers (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner authored Jan 22, 2021
1 parent e85daf0 commit 955cf9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/content/lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class Database extends Hookable {
// Collect data from file
let data = []
try {
data = await parser(file.data)
data = await parser(file.data, { path: file.path })
// Force data to be an array
data = Array.isArray(data) ? data : [data]
} catch (err) {
Expand Down

0 comments on commit 955cf9f

Please sign in to comment.