fixed initial page load rendering for expired downloads and when the upload list isn't empty. fixes #1069 and fixes #1021

This commit is contained in:
Danny Coates 2019-01-08 11:24:07 -08:00
parent e1bbff0047
commit 06b25dcba6
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
3 changed files with 11 additions and 2 deletions

View file

@ -2,6 +2,7 @@
const html = require('choo/html');
const archiveTile = require('./archiveTile');
const intro = require('./intro');
const notFound = require('./notFound');
function password(state, emit) {
const fileInfo = state.fileInfo;
@ -81,6 +82,9 @@ module.exports = function(state, emit) {
let content = '';
if (!state.fileInfo) {
state.fileInfo = createFileInfo(state);
if (!state.fileInfo.nonce) {
return notFound(state);
}
}
if (!state.transfer && !state.fileInfo.requiresPassword) {