diff --git a/src/bindings/Babel.res b/src/bindings/Babel.res index 46b36475d..2726555e4 100644 --- a/src/bindings/Babel.res +++ b/src/bindings/Babel.res @@ -59,15 +59,17 @@ module PlaygroundValidator = { switch (firstDeclaration.id, firstDeclaration.init) { | (Identifier({name}), Some(init)) if name === "App" => switch init->Null.toOption { - | Some(ObjectExpression({ - properties: [ - ObjectProperty({ + | Some(ObjectExpression({properties})) => + let foundEntryPoint = properties->Array.find(property => { + switch property { + | ObjectProperty({ key: Identifier({name: "make"}), value: Identifier({name: "Playground$App"}), - }), - ], - })) => - entryPoint.contents = true + }) => true + | _ => false + } + }) + entryPoint.contents = Option.isSome(foundEntryPoint) | _ => () } | _ => ()