Add minor changes

This commit is contained in:
Schmelczer András 2020-01-02 15:37:34 +01:00
parent 7f18e75647
commit 41d4665e49
14 changed files with 37 additions and 29 deletions

View file

@ -92,4 +92,7 @@ export const range = ({
export const last = <T>(list: Array<T>): T =>
list.length > 0 ? list[list.length - 1] : undefined;
export const isChrome = (): boolean => !!navigator.appVersion.match(/chrome/i);
export const isChrome = (): boolean =>
!!navigator.appVersion.match(/chrome/i) &&
// @ts-ignore
window.webkitRequestFileSystem !== undefined;

View file

@ -16,7 +16,10 @@ export class Page extends PageElement {
);
}
rootElement.append(...children.map(e => e.getElement()).filter(e => e));
children
.map(e => e.getElement())
.filter(e => e)
.forEach(e => rootElement.appendChild(e));
if (isRootPage) {
this.broadcastEvent({ type: PageEventType.onLoad }, this);