@timデータコンテキストとハンドルバーヘルパーにプロパティ名と競合がある場合、これらのエラーが表示されます。
あなたが持っている場合 filter
データコンテキストのプロパティとして、使用してみてください {{this.filter}}
それ以外の {{filter}}
ハンドルバーに、ヘルパーの代わりにプロパティを使用する必要があるというヒントを与えるため。
この質問はからです Githubでのこの問題. 。これが同じ問題を抱えている他の人に役立つことを願っています。
質問
テンプレートでフィルターヘルパーを使用していないにもかかわらず、TypeRrorはアセンブルの完了を妨げています。のように見えます options
パラメーターは渡されていないか、渡されています undefined
.
これがスタックトレースです:
Warning: Cannot read property 'data' of undefined Use --force to continue.
TypeError: Cannot read property 'data' of undefined
at Object.helpers.filter (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars-helpers/lib/helpers/helpers-collections.js:357:15)
at Object.eval (eval at <anonymous> (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:564:23), <anonymous>:41:50)
at Object.<anonymous> (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/runtime.js:30:33)
at Object.search (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:1274:21)
at Object.Handlebars.VM.invokePartial (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/runtime.js:81:28)
at Object.eval (eval at <anonymous> (/home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:564:23), <anonymous>:86:17)
at /home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/runtime.js:30:33
at /home/tim/workspace/projects/severine/node_modules/assemble/node_modules/assemble-handlebars/node_modules/handlebars/lib/handlebars/compiler/compiler.js:1274:21
at Object.render (/home/tim/workspace/ae_projects/severine/node_modules/assemble/node_modules/assemble-handlebars/index.js:38:17)
at Object.render (/home/tim/workspace/projects/severine/node_modules/assemble/lib/engine.js:87:17)
Aborted due to warnings.
フィルター関数の本体にコメントすると、組み立ては正常に実行されます。
解決
@timデータコンテキストとハンドルバーヘルパーにプロパティ名と競合がある場合、これらのエラーが表示されます。
あなたが持っている場合 filter
データコンテキストのプロパティとして、使用してみてください {{this.filter}}
それ以外の {{filter}}
ハンドルバーに、ヘルパーの代わりにプロパティを使用する必要があるというヒントを与えるため。
この質問はからです Githubでのこの問題. 。これが同じ問題を抱えている他の人に役立つことを願っています。