Open
Bug 1695642
Opened 4 years ago
Updated 4 years ago
Cant access this context after promise return
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(Not tracked)
NEW
People
(Reporter: Honza, Unassigned, NeedInfo)
Details
Originally reported here: https://github.com/firefox-devtools/debugger/issues/8297
Hi,
I would like to know why i cant see on the debugger the context 'this' object. It is as undefined on firefox debugger, but it appears on chrome debugger.
The code of my ts file is:
export class MYClass {
refresData(): void {
this.myService.getFunction(1)
.then(result => {
this.myProperty = result; // This object appears as undefined
}
}
}
The code of service:
async getFunction(id: number): Promise<MyObject> {
return of({...}).toPromise();
}
Version 82.0.2 (64-bit) on Windows 10
Reporter | ||
Comment 1•4 years ago
|
||
@Bomsy, can you please try to reproduce this bug, thank you!
Honza
Flags: needinfo?(hmanilla)
You need to log in
before you can comment on or make changes to this bug.
Description
•