Browse Source

with_layout: rename config to options for consistency

master
Bing Sun 5 years ago
parent
commit
64d2831d4e
Signed by: sunb GPG Key ID: F7795F8C590626AB
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      src/util/with_layout.js

+ 8
- 8
src/util/with_layout.js View File

@@ -1,15 +1,15 @@
export default config => {
if (typeof config == 'undefined')
config = {}
export default options => {
if (typeof options == 'undefined')
options = {}


if (!config.hasOwnProperty('content'))
config = {'content': config}
if (!options.hasOwnProperty('content'))
options = {'content': options}


return { return {
view: vnode => [ view: vnode => [
config.prologue,
m('main', config.content),
config.epilogue
options.prologue,
m('main', options.content),
options.epilogue
] ]
} }
} }

Loading…
Cancel
Save