refactor: ginify InAppPurchase (#24674)

This commit is contained in:
Jeremy Rose 2020-07-23 14:55:41 -07:00 committed by GitHub
parent 5cfe956fe1
commit 071c5930b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 22 deletions

View file

@ -3,11 +3,7 @@ import { EventEmitter } from 'events';
let _inAppPurchase;
if (process.platform === 'darwin') {
const { inAppPurchase, InAppPurchase } = process._linkedBinding('electron_browser_in_app_purchase');
// inAppPurchase is an EventEmitter.
Object.setPrototypeOf(InAppPurchase.prototype, EventEmitter.prototype);
EventEmitter.call(inAppPurchase);
const { inAppPurchase } = process._linkedBinding('electron_browser_in_app_purchase');
_inAppPurchase = inAppPurchase;
} else {