mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
fix(editor): NoSuchElementException when parsing color value from color scheme
This commit is contained in:
@@ -47,7 +47,7 @@ fun IDEColorScheme.parseColorValue(value: String?, colorId: Boolean = true): Int
|
||||
val refName = value.substring(1)
|
||||
val refValue =
|
||||
definitions[refName] ?: throw ParseException("Referenced color '$value' not found")
|
||||
return if (colorId) refValue else colorIds.get(refValue)
|
||||
return if (colorId) refValue else colorIds.getOrDefault(refValue, 0)
|
||||
}
|
||||
|
||||
if (value[0] == '#') {
|
||||
|
||||
Reference in New Issue
Block a user