chore: rename node bindings atom => electron (#22176)
This commit is contained in:
parent
b5e7df1cbf
commit
602913cb4c
52 changed files with 104 additions and 102 deletions
|
@ -1,10 +1,10 @@
|
|||
export function electronBindingSetup (binding: typeof process['_linkedBinding'], processType: typeof process['type']): typeof process['electronBinding'] {
|
||||
return function electronBinding (name: string) {
|
||||
try {
|
||||
return binding(`atom_${processType}_${name}`)
|
||||
return binding(`electron_${processType}_${name}`)
|
||||
} catch (error) {
|
||||
if (/No such module/.test(error.message)) {
|
||||
return binding(`atom_common_${name}`)
|
||||
return binding(`electron_common_${name}`)
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue