From bb4450e56217efd324119d1618463ffcefa20054 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 30 Nov 2020 12:49:31 +0100 Subject: [PATCH] named options --- src/RootViewModel.js | 4 ++-- src/main.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RootViewModel.js b/src/RootViewModel.js index 6e69d96..099b4e2 100644 --- a/src/RootViewModel.js +++ b/src/RootViewModel.js @@ -19,8 +19,8 @@ import {ViewModel} from "./utils/ViewModel.js"; import {PreviewViewModel} from "./preview/PreviewViewModel.js"; export class RootViewModel extends ViewModel { - constructor(request) { - super({request}); + constructor(options) { + super(options); this.link = null; this.previewViewModel = null; } diff --git a/src/main.js b/src/main.js index 4089973..2ce7f76 100644 --- a/src/main.js +++ b/src/main.js @@ -3,7 +3,7 @@ import {RootViewModel} from "./RootViewModel.js"; import {RootView} from "./RootView.js"; export async function main(container) { - const vm = new RootViewModel(xhrRequest); + const vm = new RootViewModel({request: xhrRequest}); vm.updateHash(location.hash); window.__rootvm = vm; const view = new RootView(vm);