diff --git a/atom/common/lib/init.coffee b/atom/common/lib/init.coffee index 35ad5e512d9..5da02744275 100644 --- a/atom/common/lib/init.coffee +++ b/atom/common/lib/init.coffee @@ -2,7 +2,11 @@ path = require 'path' timers = require 'timers' Module = require 'module' -process.atomBinding = (name) -> process.binding "atom_#{process.type}_#{name}" +process.atomBinding = (name) -> + try + process.binding "atom_#{process.type}_#{name}" + catch e + process.binding "atom_common_#{name}" if e.message is 'No such module' # Add common/api/lib to module search paths. globalPaths = Module.globalPaths