Browse Source

Attempting workaround to fix #68

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
f5ed933295
  1. 16
      routes/baseActionsRouter.js

16
routes/baseActionsRouter.js

@ -714,10 +714,7 @@ router.get("/address/:address", function(req, res) {
})); }));
} }
Promise.all(promises).catch(function(err) { promises.push(new Promise(function(resolve, reject) {
console.log("Error 32197rgh327g2: " + err + ", error json: " + JSON.stringify(err));
}).finally(function() {
qrcode.toDataURL(address, function(err, url) { qrcode.toDataURL(address, function(err, url) {
if (err) { if (err) {
console.log("Error 93ygfew0ygf2gf2: " + err); console.log("Error 93ygfew0ygf2gf2: " + err);
@ -725,8 +722,17 @@ router.get("/address/:address", function(req, res) {
res.locals.addressQrCodeUrl = url; res.locals.addressQrCodeUrl = url;
res.render("address"); resolve();
}); });
}));
Promise.all(promises).then(function() {
res.render("address");
}).catch(function(err) {
console.log("Error 32197rgh327g2: " + err + ", error json: " + JSON.stringify(err));
res.render("address");
}); });
}).catch(function(err) { }).catch(function(err) {

Loading…
Cancel
Save