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

This commit is contained in:
Cheng Zhao 2020-12-16 16:56:53 +09:00 committed by GitHub
parent 9eab298779
commit 998f17ee59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 () {