diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/insert-form.js b/app/code/Magento/Ui/view/base/web/js/form/components/insert-form.js index 790ce2a8cc4d950cc85652c685175eb7a55be07f..75234253c12d4362484b92e3a21a8fd2b3eef824 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/components/insert-form.js +++ b/app/code/Magento/Ui/view/base/web/js/form/components/insert-form.js @@ -89,7 +89,7 @@ define([ /** @inheritdoc*/ destroyInserted: function () { - if (this.isRendered) { + if (this.isRendered && this.externalForm()) { this.externalForm().delegate('destroy'); this.removeActions(); this.responseStatus(undefined); diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js b/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js index f77dcbb71af6855396f3e50c36579ea42600bcf7..eab8b0b8ff3537a6f2c0ec30dd0015bb02feabac 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js +++ b/app/code/Magento/Ui/view/base/web/js/form/components/insert-listing.js @@ -77,7 +77,7 @@ define([ /** @inheritdoc */ destroyInserted: function () { - if (this.isRendered) { + if (this.isRendered && this.externalListing()) { this.externalListing().destroy(); }