-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More consistent legacy color conversion
When a given "legacy color" argument is not in fact a recognised color name, `legacy_color` should return nil, and indeed it does when the argument is a string. However, the color symbol method will just return the symbol argument if it is not recognised, creating an inconsistency in the behaviour. Instead, it should return nothing, as the string case does. This change is made, and a little of the surrounding code rearranged for clarity.
- Loading branch information
Showing
1 changed file
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters