mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
🎨 Assign binding as const
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
const timers = require('timers')
|
||||
|
||||
const {binding} = process
|
||||
|
||||
process.atomBinding = function (name) {
|
||||
try {
|
||||
return process.binding('atom_' + process.type + '_' + name)
|
||||
return binding('atom_' + process.type + '_' + name)
|
||||
} catch (error) {
|
||||
if (/No such module/.test(error.message)) {
|
||||
return process.binding('atom_common_' + name)
|
||||
return binding('atom_common_' + name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user