Skip to content

Commit 6ac0f88

Browse files
committed
revert: remove debug info changes
1 parent 412a308 commit 6ac0f88

File tree

6 files changed

+244
-245
lines changed

6 files changed

+244
-245
lines changed

demo/server/DreamRSC.re

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
let env =
2-
switch (Sys.getenv_opt("DEMO_ENV")) {
3-
| Some("development") => `Dev
4-
| _ => `Prod
5-
};
1+
let debug = Sys.getenv_opt("DEMO_ENV") === Some("development");
62

73
let handleFormRequest = (actionId, formData) => {
84
let formData = {
@@ -103,9 +99,10 @@ let stream_model = (~location, app) =>
10399
stream => {
104100
let%lwt () =
105101
ReactServerDOM.render_model(
102+
~debug,
106103
~subscribe=
107104
chunk => {
108-
if (env == `Dev) {
105+
if (debug) {
109106
Dream.log("Chunk");
110107
Dream.log("%s", chunk);
111108
};
@@ -136,15 +133,15 @@ let stream_html =
136133
~bootstrapScriptContent?,
137134
~bootstrapScripts,
138135
~bootstrapModules,
139-
~env,
136+
~debug,
140137
app,
141138
);
142139

143140
let%lwt () = Dream.write(stream, html);
144141
let%lwt () = Dream.flush(stream);
145142
let%lwt () =
146143
subscribe(chunk => {
147-
if (env == `Dev) {
144+
if (debug) {
148145
Dream.log("Chunk");
149146
Dream.log("%s", chunk);
150147
};

0 commit comments

Comments
 (0)