From 864e24b2ce9d3a5e475970940ff0aad00fcc8d5f Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Wed, 10 Jan 2018 11:42:48 +0100 Subject: [PATCH 1/2] Fixed typo in test --- www/assert/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/assert/main.js b/www/assert/main.js index c792c780c..eb470eb35 100644 --- a/www/assert/main.js +++ b/www/assert/main.js @@ -134,12 +134,12 @@ define([ // check that old hashes parse correctly assert(function (cb) { - if (1) { return cb(true); } // TODO(cjd): This is a test failure which is a known bug + //if (1) { return cb(true); } // TODO(cjd): This is a test failure which is a known bug var secret = Hash.parsePadUrl('/pad/#67b8385b07352be53e40746d2be6ccd7XAYSuJYYqa9NfmInyHci7LNy'); return cb(secret.hashData.channel === "67b8385b07352be53e40746d2be6ccd7" && secret.hashData.key === "XAYSuJYYqa9NfmInyHci7LNy" && secret.hashData.version === 0 && - typeof(secret.hashData.getURL) === 'function'); + typeof(secret.getUrl) === 'function'); }, "Old hash failed to parse"); // make sure version 1 hashes parse correctly From e5b9f089fb95d6f3c48110c89b2d7b904b889b5c Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 10 Jan 2018 11:47:52 +0100 Subject: [PATCH 2/2] Fix undefined webchannel when uploading a file --- www/common/outer/async-store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index e48452b6d..7d3d15dfd 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -525,11 +525,11 @@ define([ var h = p.hashData; var owners; - if (Store.channel && Util.base64ToHex(h.channel) === Store.channel.wc.id) { + if (Store.channel && Store.channel.wc && Util.base64ToHex(h.channel) === Store.channel.wc.id) { owners = Store.channel.data.owners || undefined; } var expire; - if (Store.channel && Util.base64ToHex(h.channel) === Store.channel.wc.id) { + if (Store.channel && Store.channel.wc && Util.base64ToHex(h.channel) === Store.channel.wc.id) { expire = +Store.channel.data.expire || undefined; }