From c8748a79778d60dd598baa797367190e94da5a60 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 2 May 2024 10:21:58 +0100 Subject: [PATCH] Fix embroider-optimised --- .../vendor/experimental-render-mode-rehydrate.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js b/packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js index 2444bf69..9dd3518f 100644 --- a/packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js +++ b/packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js @@ -2,7 +2,14 @@ (function() { if (typeof FastBoot === 'undefined') { var current = document.getElementById('fastboot-body-start'); - var _Ember = require.has('ember') ? require('ember').default : Ember; + + var _Ember = require.has('ember') ? require('ember').default : window.Ember; + + if (current && !_Ember) { + console.error(`Experimental render mode rehydrate isn't working because it couldn't find Ember via AMD or global. +See https://github.com/ember-fastboot/ember-cli-fastboot/issues/938 for the current state of the fix.`); + return; + } if ( current &&