Skip to content

Commit a1d1a8a

Browse files
committed
use visitOptions.renderMode to turn on rehydration
1 parent 3a8e385 commit a1d1a8a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/fastboot/src/ember-app.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@ class EmberApp {
298298
let buildSandboxPerVisit = options.buildSandboxPerVisit || false;
299299

300300
let shouldRender = options.shouldRender !== undefined ? options.shouldRender : true;
301-
let bootOptions = buildBootOptions(shouldRender);
301+
let renderMode = process.env.EXPERIMENTAL_RENDER_MODE_SERIALIZE
302+
? 'serialize'
303+
: options.renderMode;
304+
let bootOptions = buildBootOptions(shouldRender, renderMode);
302305
let fastbootInfo = new FastBootInfo(req, res, {
303306
hostWhitelist: this.hostWhitelist,
304307
metadata: options.metadata,
@@ -355,17 +358,16 @@ class EmberApp {
355358
* Builds an object with the options required to boot an ApplicationInstance in
356359
* FastBoot mode.
357360
*/
358-
function buildBootOptions(shouldRender) {
361+
function buildBootOptions(shouldRender, renderMode) {
359362
let doc = new SimpleDOM.Document();
360363
let rootElement = doc.body;
361-
let _renderMode = process.env.EXPERIMENTAL_RENDER_MODE_SERIALIZE ? 'serialize' : undefined;
362364

363365
return {
364366
isBrowser: false,
365367
document: doc,
366368
rootElement,
367369
shouldRender,
368-
_renderMode,
370+
_renderMode: renderMode,
369371
};
370372
}
371373

0 commit comments

Comments
 (0)