Skip to content

Commit

Permalink
fix: use isEqual instead of pointer equality to convert NSAppearance (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
trop[bot] authored and codebytere committed Jun 7, 2019
1 parent 3f23f8b commit 8517c49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_system_preferences_mac.mm
Expand Up @@ -57,11 +57,11 @@ static bool FromV8(v8::Isolate* isolate,
return v8::Null(isolate);
}

if (val.name == NSAppearanceNameAqua) {
if ([val.name isEqualToString:NSAppearanceNameAqua]) {
return mate::ConvertToV8(isolate, "light");
}
if (@available(macOS 10.14, *)) {
if (val.name == NSAppearanceNameDarkAqua) {
if ([val.name isEqualToString:NSAppearanceNameDarkAqua]) {
return mate::ConvertToV8(isolate, "dark");
}
}
Expand Down

0 comments on commit 8517c49

Please sign in to comment.