Bundle preload.js

This commit is contained in:
Fedor Indutny 2021-04-07 15:40:12 -07:00 committed by Josh Perez
parent 9c3e3c4331
commit 4fd3ed7242
11 changed files with 205 additions and 232 deletions

View file

@ -13,6 +13,7 @@ import {
cloneDeep,
compact,
fromPairs,
toPairs,
get,
groupBy,
isFunction,
@ -258,9 +259,9 @@ async function goBackToMainProcess(): Promise<void> {
const channelsAsUnknown = fromPairs(
compact(
map(dataInterface, (value: any) => {
map(toPairs(dataInterface), ([name, value]: [string, any]) => {
if (isFunction(value)) {
return [value.name, makeChannel(value.name)];
return [name, makeChannel(name)];
}
return null;