From 40ba6f9bc39c713267ac3736fe65c32315ac6980 Mon Sep 17 00:00:00 2001 From: Karsten Schmidt Date: Wed, 29 Sep 2021 17:36:13 +0200 Subject: [PATCH] fix(defmulti): add DEFAULT handling for .addAll() --- packages/defmulti/src/defmulti.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/defmulti/src/defmulti.ts b/packages/defmulti/src/defmulti.ts index 7f528e1701..6fecd49fc6 100644 --- a/packages/defmulti/src/defmulti.ts +++ b/packages/defmulti/src/defmulti.ts @@ -193,6 +193,7 @@ export function defmulti( for (let id in _impls) { ok = fn.add(id, _impls[id]) && ok; } + DEFAULT in _impls && fn.setDefault(_impls[DEFAULT]); return ok; }; fn.setDefault = (impl: Implementation) => fn.add(DEFAULT, impl);