Skip to content

Commit

Permalink
Truthy check
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan committed Sep 13, 2024
1 parent da0d319 commit becde0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions localtileserver/tiler/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def _render_image(

if colormap in cmap.list():
colormap = cmap.get(colormap)
else:
c = json.loads(colormap)
elif colormap:
c = json.loads(colormap)
if isinstance(c, list):
c = LinearSegmentedColormap.from_list('', c, N=256)
colormap = {k:tuple(v) for k,v in enumerate(c(range(256),1,1))}
Expand Down

0 comments on commit becde0a

Please sign in to comment.