@nibssplc/cams-sdk-react 0.0.1-beta.10 → 0.0.1-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -116,6 +116,9 @@ function useCAMSAuth(options) {
116
116
  var sessionManagerRef = React__default.useRef(null);
117
117
  React__default.useEffect(function () {
118
118
  var _a;
119
+ // Only initialize on client side
120
+ if (typeof window === 'undefined')
121
+ return;
119
122
  (_a = sessionManagerRef.current) !== null && _a !== void 0 ? _a : (sessionManagerRef.current = new camsSdk.CAMSSessionManager(localStorage, options.storageKey || 'CAMS-SDK', {
120
123
  onAuthSuccess: function (res) {
121
124
  var _a;