From 1802656d9c1595d2d8a458c52db9628ab61bd475 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 21 May 2019 11:05:30 +0200 Subject: [PATCH] Fix templates in poll part 2 #375 --- www/common/cryptpad-common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 7b9e939b1..324e6cab9 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -477,6 +477,9 @@ define([ // PPP: password for the new template? var hash = Hash.createRandomHash(p.type); var href = '/' + p.type + '/#' + hash; + + var optsPut = {}; + if (p.type === 'poll') { optsPut.initialState = '{}'; } // PPP: add password as cryptput option Cryptput(hash, data.toSave, function (e) { if (e) { throw new Error(e); } @@ -488,7 +491,7 @@ define([ if (obj && obj.error) { return void cb(obj.error); } cb(); }); - }); + }, optsPut); }; common.isTemplate = function (href, cb) {