fix: make protocol wrapper remote-friendly again (#27043)

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
trop[bot]
2020-12-16 12:10:41 -08:00
committed by GitHub
parent e6727fb7bd
commit 39f865e4e3
2 changed files with 16 additions and 2 deletions

View File

@@ -17,8 +17,12 @@ Object.setPrototypeOf(protocol, new Proxy({}, {
ownKeys () {
if (!app.isReady()) return [];
return Reflect.ownKeys(session.defaultSession!.protocol);
},
return Object.getOwnPropertyNames(Object.getPrototypeOf(session.defaultSession!.protocol));
has: (target, property: string) => {
if (!app.isReady()) return false;
return Reflect.has(session.defaultSession!.protocol, property);
},
getOwnPropertyDescriptor () {