From 842b9d4243ca7784a7f4d9fe4170092d340877f4 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 7 Apr 2016 15:48:38 +0200 Subject: [PATCH] Generalize _socket/realtime-input.js a little more Anything JSON related should be at the application layer --- www/_socket/realtime-input.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/_socket/realtime-input.js b/www/_socket/realtime-input.js index c592d49f9..24e2e140f 100644 --- a/www/_socket/realtime-input.js +++ b/www/_socket/realtime-input.js @@ -147,8 +147,9 @@ define([ passwd, // password, to be deprecated (maybe) channel, // the channel we're to connect to - // initialState argument. (optional) - config.initialState || '{}', + /* optional unless your application expects JSON + from getUserDoc */ + config.initialState || '', // transform function (optional), which handles conflicts { transformFunction: config.transformFunction }); @@ -160,7 +161,6 @@ define([ // this is a problem warn("realtime.getUserDoc() !== newText"); } - //try{throw new Error();}catch(e){console.log(e.stack);} }; // pass your shiny new realtime into initialization functions