more conformant tagPrompt behaviour

This commit is contained in:
ansuz
2017-09-20 17:55:05 +02:00
parent db4c3e7e2c
commit 68f7d4bc0a
2 changed files with 23 additions and 12 deletions

View File

@@ -203,12 +203,11 @@ define([
.click(function () {
sframeChan.query('Q_TAGS_GET', null, function (err, res) {
if (err || res.error) { return void console.error(err || res.error); }
var dialog = Cryptpad.dialog.tagPrompt(res.data, function (tags) {
Cryptpad.dialog.tagPrompt(res.data, function (tags) {
if (!Array.isArray(tags)) { return; }
console.error(tags);
sframeChan.event('EV_TAGS_SET', tags);
});
document.body.appendChild(dialog);
});
});
break;