From f0e0a7b0c1896d398f84f6a32648e2da797688a4 Mon Sep 17 00:00:00 2001 From: Valentin Silytuin Date: Tue, 26 Mar 2024 14:19:13 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=BF=D0=BE=20=D0=BA=D0=BE=D0=B4=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 || ''} `