From: Thomas Tuts Date: Tue, 9 Jun 2015 16:01:09 +0000 (+0200) Subject: Clean up code in global shortcut code example X-Git-Tag: v0.28.0~12^2~11 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e829a289475366e1a5b9c87e1281333c73837d92;p=electron.git Clean up code in global shortcut code example --- diff --git a/docs/api/global-shortcut.md b/docs/api/global-shortcut.md index e48519b9..871357f8 100644 --- a/docs/api/global-shortcut.md +++ b/docs/api/global-shortcut.md @@ -9,8 +9,10 @@ var globalShortcut = require('global-shortcut'); // Register a 'ctrl+x' shortcut listener. var ret = globalShortcut.register('ctrl+x', function() { console.log('ctrl+x is pressed'); }) -if (!ret) + +if (!ret) { console.log('registration failed'); +} // Check whether a shortcut is registered. console.log(globalShortcut.isRegistered('ctrl+x'));