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
MarshallOfSound authored and codebytere committed Jun 7, 2019
1 parent b10c946 commit a9f6016
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 @@ -66,11 +66,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 a9f6016

Please sign in to comment.