From ab727cb5a5f29e1ab31066cc77cb47dd763c8276 Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Fri, 5 May 2017 12:15:33 -0300 Subject: [PATCH] fallback to local data when extension is disabled - Auditors: @bbondy - Fix #8720 --- app/renderer/lib/extensionsUtil.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/renderer/lib/extensionsUtil.js b/app/renderer/lib/extensionsUtil.js index 7c4b4b5583..cfbff015b6 100644 --- a/app/renderer/lib/extensionsUtil.js +++ b/app/renderer/lib/extensionsUtil.js @@ -84,7 +84,10 @@ module.exports.populateDefaultExtensions = (extensionsState) => { // At the time of this writing we don't have access to any extension data // unless it's installed. In such cases populate extensions state // with our dummy content. - if (!newState.get(data.id)) { + // If extension is disabled then chrome-extension URL is no longer valid, + // so image and description will break. For such case we need to fallback + // to dummy again to avoid bad UI. + if (!newState.get(data.id) || !newState.getIn([data.id, 'enabled'])) { newState = newState.set(data.id, dummyExtensionManifest.get(data.id)) } })