pass options to parent in LoginViewModel

This commit is contained in:
Bruno Windels 2020-05-07 19:17:15 +02:00
parent f56b96b0ff
commit c55a197303

View file

@ -2,8 +2,9 @@ import {ViewModel} from "./ViewModel.js";
import {SessionLoadViewModel} from "./SessionLoadViewModel.js"; import {SessionLoadViewModel} from "./SessionLoadViewModel.js";
export class LoginViewModel extends ViewModel { export class LoginViewModel extends ViewModel {
constructor({sessionCallback, defaultHomeServer, createSessionContainer}) { constructor(options) {
super(); super(options);
const {sessionCallback, defaultHomeServer, createSessionContainer} = options;
this._createSessionContainer = createSessionContainer; this._createSessionContainer = createSessionContainer;
this._sessionCallback = sessionCallback; this._sessionCallback = sessionCallback;
this._defaultHomeServer = defaultHomeServer; this._defaultHomeServer = defaultHomeServer;