Skip to content

Commit

Permalink
Merge pull request #3 from rapkyt/issue/fix-demo-substring
Browse files Browse the repository at this point in the history
Fix substring issue in demo.
  • Loading branch information
dylanroy authored Jun 27, 2018
2 parents 4ac1da1 + ac6b704 commit 5930912
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ const Listener = require('../Listener');
const quietDemo = process.env.QUIET_DEMO;

const onMessageCallback = (msg) => {
let message = `${msg.data}`;
if (quietDemo === true.toString()) {
message = `${msg.data.substring(0, 50)} ...`;
message = `${message.substring(0, 50)} ...`;
}
console.log(`Received message: ${msg.data}\n`);
console.log(`Received message: ${message}\n`);
};

const listener = new Listener();
Expand Down

0 comments on commit 5930912

Please sign in to comment.