fix: default to system accent color on invalid user color (#47660)

fix: default to system accent color on invalid user color"
This commit is contained in:
Shelley Vohr
2025-07-08 11:15:13 +02:00
committed by GitHub
parent 03a02fc31e
commit 31bc5ca903
11 changed files with 38 additions and 41 deletions

View File

@@ -227,7 +227,7 @@ bool Converter<WrappedSkColor>::FromV8(v8::Isolate* isolate,
std::string str;
if (!gin::ConvertFromV8(isolate, val, &str))
return false;
*out = electron::ParseCSSColor(str);
*out = electron::ParseCSSColor(str).value_or(SK_ColorWHITE);
return true;
}