Skip to content

Commit

Permalink
fix: Trigger handlers for falsy values as well. Ignore None only. #1484
Browse files Browse the repository at this point in the history
  • Loading branch information
mturoci committed Aug 11, 2023
1 parent 78d87a0 commit 6e6bd5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions py/h2o_wave/h2o_wave/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from typing import Optional, Callable
from inspect import signature
import asyncio
import logging
from starlette.routing import compile_path
from .core import expando_to_dict
Expand Down Expand Up @@ -125,7 +124,7 @@ async def _match_predicate(predicate: Callable, func: Callable, arity: int, q: Q
await _invoke_handler(func, arity, q, arg)
return True
else:
if arg:
if arg is not None:
await _invoke_handler(func, arity, q, arg)
return True
return False
Expand Down

0 comments on commit 6e6bd5a

Please sign in to comment.