From 6b9bbb0d32b674200cea1f5399507feaf40905e1 Mon Sep 17 00:00:00 2001 From: James Cook Date: Sun, 13 Jun 2021 10:36:17 +0100 Subject: [PATCH] - Display error message if imsmanifest.xml can't be found --- src/CommonCartridge.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CommonCartridge.js b/src/CommonCartridge.js index 0f9945c2..353e8d1d 100644 --- a/src/CommonCartridge.js +++ b/src/CommonCartridge.js @@ -205,7 +205,7 @@ export default class CommonCartridge extends Component { entry => entry.filename === "imsmanifest.xml" ); - if (manifestEntry != null) { + if (manifestEntry) { let xml; try { xml = await getTextFromEntry(manifestEntry); @@ -215,6 +215,8 @@ export default class CommonCartridge extends Component { if (xml != null) { this.loadResources(xml); } + } else { + this.setState({ errorLoading: true }); } }