From d091afe983ae7ec8b9713de7c09426285381b12d Mon Sep 17 00:00:00 2001 From: Aiko Mastboom Date: Fri, 26 Apr 2013 11:54:15 +0200 Subject: [PATCH] trying to figure out why i see inconsistent share open results.. --- installit | 5 +++++ public/index.html | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/installit b/installit index 850e2e9..9a3c043 100755 --- a/installit +++ b/installit @@ -7,6 +7,11 @@ set -e current_dir=$(cd $(dirname $0) && pwd) cd ${current_dir} +# patch ShareJS client +if [ ! -f ./node_modules/share/webclient/share.js_orig ]; then + sed -e s/removeListener/removeDocListener/g -i _orig ./node_modules/share/webclient/share.js + sed -e s/removeListener/removeDocListener/g -i _orig ./node_modules/share/webclient/share.uncompressed.js +fi # Knockout mkdir -p ./public/lib/knockout cd ./public/lib/knockout diff --git a/public/index.html b/public/index.html index d1b0219..36620ba 100644 --- a/public/index.html +++ b/public/index.html @@ -501,14 +501,6 @@ function loadLocation(location, callback) { debug && console.log('opened location', location.collection, location.name, doc, doc.snapshot, doc.state); if (doc.snapshot == null) { debug && console.log('wait for first change', location, doc.version); - doc.once('opening', function onceOpening() { - debug && console.log('received first opening', location, doc.snapshot); - //callback(null, doc); - }); - doc.once('open', function onceOpen() { - debug && console.log('received first open', location, doc.snapshot); - //callback(null, doc); - }); doc.once('change', function onceChange() { debug && console.log('received first change', location, doc.snapshot); callback(null, doc);