Commit f84c463c authored by marioromera's avatar marioromera
Browse files

fix respons.json unhandled

parent c4384ce9
......@@ -127,9 +127,10 @@ async function getRevisions() {
logger.warn('Connection error', e);
});
const etherpadJson = await response.json();
if (!etherpadJson.data) {
const etherpadJson = response && response.json();
if (!etherpadJson && etherpadJson.data) {
logger.warn('No revisions found');
return [];
}
return etherpadJson.data;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment