Correctly set shouldEscapeHtml variable default

pull/240/head
Paul Cockrell 2020-04-06 17:15:25 +01:00
parent 094d518180
commit e4431987d8
2 changed files with 1 additions and 2 deletions

View File

@ -26,7 +26,6 @@ function showChangeLog(appid) {
function showReadme(appid) {
var app = appNameToApp(appid);
function show(contents) {
document.contents = contents;
if (!contents) return;
showPrompt(app.name + " Documentation", marked(contents), {ok: true}, false).catch(() => {});
}

View File

@ -99,7 +99,7 @@ function showToast(message, type) {
/// Show a yes/no prompt
function showPrompt(title, text, buttons, shouldEscapeHtml) {
if (!buttons) buttons={yes:1,no:1};
if (!shouldEscapeHtml) shouldEscapeHtml = true;
if (typeof(shouldEscapeHtml) === 'undefined' || shouldEscapeHtml === null) shouldEscapeHtml = true;
return new Promise((resolve,reject) => {
var modal = htmlElement(`<div class="modal active">