fix: use isEqual instead of pointer equality to convert NSAppearance (#18665)

This commit is contained in:
Samuel Attard 2019-06-07 09:55:29 -07:00 committed by Shelley Vohr
parent b10c946564
commit a9f601612f

View file

@ -66,11 +66,11 @@ struct Converter<NSAppearance*> {
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");
}
}