Closed haykam821 closed 2 years ago
When returning a result of 0, the actual result will end up being 1 instead.
0
1
This issue is caused by 0 being a falsy value. Thus, it falls back to the default result of 1:
https://github.com/misode/brigadier-ts/blob/303e686b7479c76cf25ff63405a22b1fa63c33fd/src/CommandDispatcher.ts#L85
When returning a result of
0
, the actual result will end up being1
instead.This issue is caused by
0
being a falsy value. Thus, it falls back to the default result of1
:https://github.com/misode/brigadier-ts/blob/303e686b7479c76cf25ff63405a22b1fa63c33fd/src/CommandDispatcher.ts#L85