mirror of
https://github.com/electron/electron.git
synced 2026-01-28 08:48:14 -05:00
Throw when inAppPurchase is used on unsupported platforms
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user