pug-html-loader
pug-html-loader copied to clipboard
fixed param data error
@denver23 if I console.log query I have an object like this
{ 'options[debug]': true,
'options[compileDebug]': true,
'options[pretty]': true,
'options[data][title]': 'hello',
'options[data][home][title]': 'Lorem Title',
'options[data][home][sections][hero][title]': 'Lorem ipsum dolor sit'
}
but if I console log data
let data = typeof query.data === 'object' ? query.data : JSON.parse(query.data || '{}')
console.log(data)
data is ever {}
can you help me?
@giacomoalonzi Please try to access your data parameters as title instead data.title