kui-utils 0.0.27 → 0.0.29

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/index.js CHANGED
@@ -61,7 +61,7 @@ var useTabIndex = function (paths) {
61
61
 
62
62
  var useWindowWidth = function (time) {
63
63
  if (time === void 0) { time = 10; }
64
- var _a = useState((window === null || window === void 0 ? void 0 : window.innerWidth) || 0), width = _a[0], setWidth = _a[1];
64
+ var _a = useState(typeof window === "undefined" ? 0 : (window === null || window === void 0 ? void 0 : window.innerWidth) || 0), width = _a[0], setWidth = _a[1];
65
65
  useEffect(function () {
66
66
  setWidth(window.innerWidth);
67
67
  var handleResize = _.debounce(function () {
@@ -2206,7 +2206,7 @@ var Loader = /** @class */ (function () {
2206
2206
  };
2207
2207
  this.setError = function (errorMessage, err) {
2208
2208
  _this.hasError = true;
2209
- if (err.status === 403) {
2209
+ if ((err === null || err === void 0 ? void 0 : err.status) === 403) {
2210
2210
  _this.errorMessage = "You do not have access to this";
2211
2211
  }
2212
2212
  else {