Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
chore(modal): wrapped backdrop-- in a if(options.backdrop)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Alexander Webb authored and mgcrea committed Nov 11, 2015
1 parent 166d3f9 commit db49e18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.core', 'mgcrea.ngStrap.h
$modal.hide = function() {
if(!$modal.$isShown) return;

// decrement number of modals
backdropCount--;
if(options.backdrop) {
// decrement number of modals
backdropCount--;
}

if(scope.$emit(options.prefixEvent + '.hide.before', $modal).defaultPrevented) {
return;
Expand Down

0 comments on commit db49e18

Please sign in to comment.