named options
This commit is contained in:
parent
91b328f540
commit
bb4450e562
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue