File tree 3 files changed +25
-0
lines changed
android/capacitor/src/main/assets
ios/Capacitor/Capacitor/assets
3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -392,6 +392,14 @@ var nativeBridge = (function (exports) {
392
392
headers : nativeResponse . headers ,
393
393
status : nativeResponse . status ,
394
394
} ) ;
395
+ /*
396
+ * copy url to response, `cordova-plugin-ionic` uses this url from the response
397
+ * we need `Object.defineProperty` because url is an inherited getter on the Response
398
+ * see: https://stackoverflow.com/a/57382543
399
+ * */
400
+ Object . defineProperty ( response , 'url' , {
401
+ value : nativeResponse . url ,
402
+ } ) ;
395
403
console . timeEnd ( tag ) ;
396
404
return response ;
397
405
}
Original file line number Diff line number Diff line change @@ -447,6 +447,15 @@ const initBridge = (w: any): void => {
447
447
status : nativeResponse . status ,
448
448
} ) ;
449
449
450
+ /*
451
+ * copy url to response, `cordova-plugin-ionic` uses this url from the response
452
+ * we need `Object.defineProperty` because url is an inherited getter on the Response
453
+ * see: https://stackoverflow.com/a/57382543
454
+ * */
455
+ Object . defineProperty ( response , 'url' , {
456
+ value : nativeResponse . url ,
457
+ } ) ;
458
+
450
459
console . timeEnd ( tag ) ;
451
460
return response ;
452
461
} catch ( error ) {
Original file line number Diff line number Diff line change @@ -392,6 +392,14 @@ var nativeBridge = (function (exports) {
392
392
headers : nativeResponse . headers ,
393
393
status : nativeResponse . status ,
394
394
} ) ;
395
+ /*
396
+ * copy url to response, `cordova-plugin-ionic` uses this url from the response
397
+ * we need `Object.defineProperty` because url is an inherited getter on the Response
398
+ * see: https://stackoverflow.com/a/57382543
399
+ * */
400
+ Object . defineProperty ( response , 'url' , {
401
+ value : nativeResponse . url ,
402
+ } ) ;
395
403
console . timeEnd ( tag ) ;
396
404
return response ;
397
405
}
You can’t perform that action at this time.
0 commit comments