Skip to content

Commit 0ae3a4c

Browse files
Merge pull request livecode#2818 from livecodeali/bugfix-15851
[[ Bug 15851 ]] Fix error returning swatchColor when it is empty
2 parents 2781f70 + bc2fa0e commit 0ae3a4c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

extensions/widgets/colorswatch/colorswatch.lcb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ public handler setColor(in tColor as optional String) returns nothing
208208
end handler
209209

210210
public handler getColor() returns String
211-
return colorToString(mColor)
211+
if mColor is nothing then
212+
return ""
213+
else
214+
return colorToString(mColor)
215+
end if
212216
end handler
213217
----------
214218

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# [15851] error getting swatchColor when it is empty

0 commit comments

Comments
 (0)