Merge pull request #3037 from mikezimm/patch-2

disable eslint if the logic needs to be != null
This commit is contained in:
Hugo Bernier 2022-11-07 10:22:03 -05:00 committed by GitHub
commit 9fd894df7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -12,10 +12,10 @@ import "@pnp/sp/batching";
var _sp: SPFI = null;
export const getSP = (context?: WebPartContext): SPFI => {
if (context != null) {
if (context != null) { // eslint-disable-line eqeqeq
//You must add the @pnp/logging package to include the PnPLogging behavior it is no longer a peer dependency
// The LogLevel set's at what level a message will be written to the console
_sp = spfi().using(SPFx(context)).using(PnPLogging(LogLevel.Warning));
}
return _sp;
};
};