<p dir="auto">If a modal window is created without a backdrop when you try to close it it tries to remove backdrop which was never created.</p>
<p dir="auto">With options { backdrop: false }, this.$backdrop.remove() is still being called which results in an exception as this.$backdrop is null.</p>
<code class="notranslate">
    hideModal: function () {
        var that = this
        this.$element.hide()
        this.backdrop(function () {
          that.removeBackdrop()
          that.$element.trigger('hidden')
        })
      }
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="removeBackdrop: function () {
        this.$backdrop.remove()
        this.$backdrop = null
  }"><pre class="notranslate"><code class="notranslate">removeBackdrop: function () {
        this.$backdrop.remove()
        this.$backdrop = null
  }
</code></pre></div>
</code>