forked from reactjs/react-modal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fixed] remove es2015 from v1 branch
closes reactjs#375
- Loading branch information
1 parent
c8fbae4
commit 1db0ee1
Showing
1 changed file
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
const modals = []; | ||
var modals = []; | ||
|
||
export function add (element) { | ||
if (modals.indexOf(element) === -1) { | ||
modals.push(element); | ||
module.exports = { | ||
add (element) { | ||
if (modals.indexOf(element) === -1) { | ||
modals.push(element); | ||
} | ||
}, | ||
remove (element) { | ||
const index = modals.indexOf(element); | ||
if (index === -1) { | ||
return; | ||
} | ||
modals.splice(index, 1); | ||
}, | ||
count () { | ||
return modals.length; | ||
} | ||
} | ||
|
||
export function remove (element) { | ||
const index = modals.indexOf(element); | ||
if (index === -1) { | ||
return; | ||
} | ||
modals.splice(index, 1); | ||
} | ||
|
||
export function count () { | ||
return modals.length; | ||
} | ||
}; |