mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-27 01:12:50 +03:00
Make sure connect is defined before running it.
This commit is contained in:
parent
ebc7812973
commit
e94d9b0cf7
@ -175,8 +175,10 @@ const appPromise = pagesInit({
|
|||||||
});
|
});
|
||||||
userInit(appPromise);
|
userInit(appPromise);
|
||||||
|
|
||||||
connect(function (newContentJson) {
|
if (typeof connect === "function") {
|
||||||
appPromise.then((app) => {
|
connect(function (newContentJson) {
|
||||||
app.ports.fromJsPort.send({ contentJson: newContentJson });
|
appPromise.then((app) => {
|
||||||
|
app.ports.fromJsPort.send({ contentJson: newContentJson });
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user