Skip to content

Commit 09afa3a

Browse files
committed
Reverted TypeHandler function to older definition to fix minification issue and reduce minimized chars
1 parent 7d25bd3 commit 09afa3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

EasyCommands/BlockHandlers/BlockHandlers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ public PropertyHandler<T> ReturnTypedHandler(Return defaultReturn, params TypeHa
192192
};
193193

194194
PropertyHandler<T> TypedHandler<U>(U defaultType, Func<PropertySupplier, U> Resolver, params TypeHandler<T, U>[] handlers) {
195-
var typeHandlers = handlers.SelectMany(handler => handler.supportedTypes, (handler, type) => new { handler.handler, type })
196-
.ToDictionary(o => o.type, o => o.handler);
195+
var typeHandlers = NewDictionary<U, PropertyHandler<T>>();
196+
foreach (TypeHandler<T, U> handler in handlers) foreach (U type in handler.supportedTypes) typeHandlers.Add(type, handler.handler);
197197
return new SimplePropertySupplierBasedHandler<T>(p => typeHandlers.GetValueOrDefault(Resolver(p), typeHandlers[defaultType]));
198198
}
199199

0 commit comments

Comments
 (0)