diff --git a/lib/helpers/refCount.js b/lib/helpers/refCount.js index 8bcfdd49..76a84c97 100644 --- a/lib/helpers/refCount.js +++ b/lib/helpers/refCount.js @@ -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; -} +};