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:
Jonas Galvez 2018-08-17 05:22:52 -03:00 committed by Clark Du
parent 4c18320da1
commit 280983fa88

View File

@ -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])
}