[REF] move event_bus into utils, readd 2 functions

This commit is contained in:
Géry Debongnie
2021-11-13 16:21:01 +01:00
committed by Samuel Degueldre
parent d4c4fe853e
commit 63bfdfb8db
7 changed files with 33 additions and 10 deletions
+5 -1
View File
@@ -1,6 +1,11 @@
import { BDom, multi, text, toggler } from "../blockdom";
import { validateProps } from "../component/props_validation";
/**
* This file contains utility functions that will be injected in each template,
* to perform various useful tasks in the compiled code.
*/
function withDefault(value: any, defaultValue: any): any {
return value === undefined || value === null || value === false ? defaultValue : value;
}
@@ -19,7 +24,6 @@ function callSlot(
if (defaultSlot) {
let child1: BDom | undefined = undefined;
let child2: BDom | undefined = undefined;
// const result = new BMulti(2);
if (slotBDom) {
child1 = dynamic ? toggler(name, slotBDom) : slotBDom;
} else {