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";
export class LoginViewModel extends ViewModel {
constructor({sessionCallback, defaultHomeServer, createSessionContainer}) {
super();
constructor(options) {
super(options);
const {sessionCallback, defaultHomeServer, createSessionContainer} = options;
this._createSessionContainer = createSessionContainer;
this._sessionCallback = sessionCallback;
this._defaultHomeServer = defaultHomeServer;