Skip to content

Commit

Permalink
Check for null value in getBoolFromEnum
Browse files Browse the repository at this point in the history
  • Loading branch information
HeitorAugustoLN authored Aug 25, 2024
1 parent e54d7c9 commit 0fe6a54
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/apps/ghostwriter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ let
enum;

getBoolFromEnum = enum: value:
if (getIndexFromEnum enum value) == 0
then false
else true;
if value == null
then null
else
if (getIndexFromEnum enum value) == 0
then false
else true;

styleStrategyType = lib.types.submodule {
options = with qfont.styleStrategy; {
Expand Down

0 comments on commit 0fe6a54

Please sign in to comment.