mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: remove string interpolation from App.js (#3750)
In migrating an `1.4.2` app to edge, I came across this bug: ``` ✖ fatal Error: Could not compile template /Users/jonas/.../node_modules/nuxt-edge/lib/app/App.js: layout is not defined ``` Upon much investigation, I traced it to the string interpolation used in the `App.js` template. I replaced with regular concatenation and the error was gone.
This commit is contained in:
parent
4c18320da1
commit
280983fa88
@ -88,8 +88,8 @@ export default {
|
||||
},
|
||||
loadLayout (layout) {
|
||||
const undef = !layout
|
||||
const inexisting = !(layouts[`_${layout}`] || resolvedLayouts[`_` + layout])
|
||||
let _layout = `_${(undef || inexisting) ? 'default' : layout}`
|
||||
const inexisting = !(layouts['_' + layout] || resolvedLayouts['_' + layout])
|
||||
let _layout = '_' + ((undef || inexisting) ? 'default' : layout)
|
||||
if (resolvedLayouts[_layout]) {
|
||||
return Promise.resolve(resolvedLayouts[_layout])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user