robbyson-frontend-library 1.0.66 → 1.0.68

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.
@@ -97,7 +97,11 @@ export function getCroppedImg(imageSrc, pixelCrop, flip, type) {
97
97
  });
98
98
  }
99
99
  export function checkExpiresPublicUrl(publicUrl) {
100
- var expiresIn = parseInt(publicUrl.split("Expires=")[1].split("&")[0]);
100
+ var _a, _b;
101
+ var expiresIn = parseInt((_b = (_a = publicUrl.split("Expires=")[1]) === null || _a === void 0 ? void 0 : _a.split("&")) === null || _b === void 0 ? void 0 : _b[0]);
102
+ if (!expiresIn) {
103
+ return false;
104
+ }
101
105
  var currentTime = Math.floor(new Date().getTime() / 1000);
102
106
  return currentTime > expiresIn;
103
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.66",
3
+ "version": "1.0.68",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -132,6 +132,7 @@ export interface IChatFormattedMessage extends MessageModel {
132
132
  name?: string;
133
133
  userPicture?: string;
134
134
  sending?: boolean;
135
+ error?: boolean;
135
136
  }
136
137
 
137
138
  export interface IChatBotFields {
@@ -74,7 +74,11 @@ export async function getCroppedImg(
74
74
  }
75
75
 
76
76
  export function checkExpiresPublicUrl(publicUrl: string): boolean {
77
- const expiresIn = parseInt(publicUrl.split("Expires=")[1].split("&")[0]);
77
+ const expiresIn = parseInt(publicUrl.split("Expires=")[1]?.split("&")?.[0]);
78
+
79
+ if (!expiresIn) {
80
+ return false;
81
+ }
78
82
 
79
83
  const currentTime = Math.floor(new Date().getTime() / 1000);
80
84