add await to super.onInit() in sample
I was getting floating promise warning when calling super.onInit() without an await; Added await and the warning went away. ```console [00:46:34] Warning - lint - src\webparts\listAPalooza\ListAPaloozaWebPart.ts(44,5): error @typescript-eslint/no-floating-promises: Promises mu [00:46:34] Warning - lint - src\webparts\listAPalooza\pnpjsConfig.ts(15,15): error eqeqeq: Expected '!==' and instead saw '!='. ```
This commit is contained in:
parent
3fb4d929d3
commit
fdbec37d1c
|
@ -26,7 +26,7 @@ export default class PnPjsExampleWebPart extends BaseClientSideWebPart<IPnPjsExa
|
|||
protected async onInit(): Promise<void> {
|
||||
this._environmentMessage = this._getEnvironmentMessage();
|
||||
|
||||
super.onInit();
|
||||
await super.onInit();
|
||||
|
||||
//Initialize our _sp object that we can then use in other packages without having to pass around the context.
|
||||
// Check out pnpjsConfig.ts for an example of a project setup file.
|
||||
|
|
Loading…
Reference in New Issue