From d3ce83595650178c8aa8d6a20d73217db013f7b7 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 18 Sep 2020 11:42:09 +0100 Subject: [PATCH] bug fix --- src/components/modals/Addons.jsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/modals/Addons.jsx b/src/components/modals/Addons.jsx index 8f2a0ede..0c7a155f 100644 --- a/src/components/modals/Addons.jsx +++ b/src/components/modals/Addons.jsx @@ -51,7 +51,21 @@ export default class Addons extends React.PureComponent { } uninstall() { - MarketplaceFunctions.uninstall(this.state.current_data.name, this.state.current_data.type); + let type; + let data = this.state.current_data.type; + if (data === undefined) data = this.state.current_data.content.data.type; + switch (data) { + case 'photos': + type = 'photo_packs'; + break; + case 'quotes': + type = 'quote_pack'; + break; + default: + type = this.state.current_data.type; + break; + } + MarketplaceFunctions.uninstall(this.state.current_data.name, type); toast(this.props.toastLanguage.removed); this.setState({ button: '',