Merge pull request #10725 from electron/version-lock-escape-item

Ensure that the touchbar's esape item can be set before setting it
This commit is contained in:
Samuel Attard 2017-10-10 17:07:04 +11:00 committed by GitHub
commit 4ffb6c5f75

View file

@ -143,6 +143,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item";
}
- (void)setEscapeTouchBarItem:(const mate::PersistentDictionary&)item forTouchBar:(NSTouchBar*)touchBar {
if (![touchBar respondsToSelector:@selector(escapeKeyReplacementItemIdentifier)]) return;
std::string type;
std::string item_id;
NSTouchBarItemIdentifier identifier = nil;