Skip to content

Commit eee6f0d

Browse files
committed
small fix things
1 parent 2f25f08 commit eee6f0d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/containers/tw-custom-extension-modal.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class CustomExtensionModal extends React.Component {
136136
if (!loadedIds.includes(this.props.swapId)) {
137137
for (const ext of loadedIds) this.props.vm.extensionManager.removeExtension(ext);
138138
// eslint-disable-next-line no-alert
139-
alert('The extension you used to for the edit had a different id to the one you where editing.');
139+
alert('The extension you used for the edit had a different ID than the one you were editing.');
140140
}
141141
this.props.vm.runtime._removeExtensionPrimitive(this.props.swapId);
142142
loadedIds.forEach(extId => {
@@ -152,8 +152,11 @@ class CustomExtensionModal extends React.Component {
152152
} catch (err) {
153153
failed = true;
154154
log.error(err);
155-
// eslint-disable-next-line no-alert
156-
alert(err);
155+
156+
if (err) {
157+
// eslint-disable-next-line no-alert
158+
alert(err);
159+
}
157160
} finally {
158161
if (failed && this.props.swapId) {
159162
// eslint-disable-next-line no-alert

0 commit comments

Comments
 (0)