diff --git a/index.js b/index.js index e9cd82f..34192e9 100644 --- a/index.js +++ b/index.js @@ -133,9 +133,9 @@ const init = async (items = [], options = {}, index = 0) => { }, set init(val) { this.state = val; - this.callback.forEach((i) => { + for (const i of this.callback) { i(val); - }); + } }, callback: [], addListener(callback) { @@ -159,8 +159,8 @@ const init = async (items = [], options = {}, index = 0) => {
${items.join('')}
- ${options.pagination ? options.pagination : ''} - ${options.navigation ? options.navigation : ''} + ${options.pagination || ''} + ${options.navigation || ''} `