diff options
author | 2021-08-13 00:45:01 +0530 | |
---|---|---|
committer | 2021-08-13 00:45:01 +0530 | |
commit | 2d27d5e66649d4f5baf127a53ee5ae524eae3a59 (patch) | |
tree | c592ea219ac8cd987fc367f57b54034c450ab2ab /src/actions/lib/actions.js | |
parent | Ferdi v5.6.0 (diff) | |
parent | 5.6.1-nightly.24 [skip ci] (diff) | |
download | ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.gz ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.zst ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.zip |
chore: merge from nightly branch into release branch in prep for next beta
Diffstat (limited to 'src/actions/lib/actions.js')
-rw-r--r-- | src/actions/lib/actions.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/actions/lib/actions.js b/src/actions/lib/actions.js index b38db9946..7be40f1cf 100644 --- a/src/actions/lib/actions.js +++ b/src/actions/lib/actions.js | |||
@@ -8,12 +8,12 @@ export const createActionsFromDefinitions = (actionDefinitions, validate) => { | |||
8 | }; | 8 | }; |
9 | actions[actionName] = action; | 9 | actions[actionName] = action; |
10 | action.listeners = []; | 10 | action.listeners = []; |
11 | action.listen = listener => action.listeners.push(listener); | 11 | action.listen = (listener) => action.listeners.push(listener); |
12 | action.off = (listener) => { | 12 | action.off = (listener) => { |
13 | const { listeners } = action; | 13 | const { listeners } = action; |
14 | listeners.splice(listeners.indexOf(listener), 1); | 14 | listeners.splice(listeners.indexOf(listener), 1); |
15 | }; | 15 | }; |
16 | action.notify = params => action.listeners.forEach(listener => listener(params)); | 16 | action.notify = (params) => action.listeners.forEach((listener) => listener(params)); |
17 | }); | 17 | }); |
18 | return actions; | 18 | return actions; |
19 | }; | 19 | }; |