Skip to content

Commit

Permalink
Minor tweak to error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Jan 3, 2025
1 parent 7ed3888 commit 6bd400b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/travertino/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,8 @@ def refresh(self, viewport):
# as a parameter.
try:
self.style.layout(viewport)

except TypeError as error:
if (
"layout() missing 1 required positional argument: 'viewport'"
in str(error)
):
if "layout() missing 1 required positional argument:" in str(error):
self.style.layout(self, viewport)
else:
raise
Expand Down

0 comments on commit 6bd400b

Please sign in to comment.