Throw when inAppPurchase is used on unsupported platforms
This commit is contained in:
parent
a883d3d50d
commit
bd271cffb9
2 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
'use strict'
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
throw new Error('The inAppPurchase module can only be used on macOS')
|
||||
}
|
||||
|
||||
const {EventEmitter} = require('events')
|
||||
const {inAppPurchase, InAppPurchase} = process.atomBinding('in_app_purchase')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue