Skip to content

Commit 97872eb

Browse files
committed
print out timestamp only when NODE_ENV='debug'
1 parent 8217b0e commit 97872eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/react-most.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ let Most = React.createClass({
8383
let engineClass = this.props && this.props.engine || mostEngine
8484
let engine = engineClass();
8585
// TODO: add support for ReactiveX
86-
if(process.env.NODE_ENV!='production') {
86+
if(process.env.NODE_ENV==='debug') {
8787
if(engineClass == mostEngine) {
8888
engine.intentStream.timestamp()
89-
.observe(stamp=>console.log(`[${new Date(stamp.time).toLocaleTimeString()}][INTENT]:}`, stamp.value));
89+
.observe(stamp=>console.log(`[${new Date(stamp.time).toJSON()}][INTENT]:}`, stamp.value));
9090
engine.historyStream.timestamp()
91-
.observe(stamp=>console.log(`[${new Date(stamp.time).toLocaleTimeString()}][STATE]:}`, stamp.value));
91+
.observe(stamp=>console.log(`[${new Date(stamp.time).toJSON()}][STATE]:}`, stamp.value));
9292
}
9393
}
9494

0 commit comments

Comments
 (0)