From 51ad4c5ca63645a9875f51846cf6a798ce9a8f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Hauszknecht?= Date: Mon, 4 Sep 2017 14:46:31 +0200 Subject: [PATCH] optimize invoking listeners --- src/store.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store.ts b/src/store.ts index 8d57464..54bbbaa 100644 --- a/src/store.ts +++ b/src/store.ts @@ -24,7 +24,8 @@ export class Store implements IStore { } finally { this.isDispatching = false; } - this.listeners.forEach(listener => listener()); + for (let i = 0; i