diff --git a/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts b/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts index 8ba4641ba..4e3346834 100644 --- a/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts +++ b/samples/react-pnp-js-sample/src/webparts/pnPjsExample/pnpjsConfig.ts @@ -12,7 +12,7 @@ import "@pnp/sp/batching"; var _sp: SPFI = null; export const getSP = (context?: WebPartContext): SPFI => { - if (context != null) { // eslint-disable-line eqeqeq + if (!!context) { // 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));