Skip to content

πŸ”₯ The free & Open Source DocuSign alternative

Solved the issue of undefined charAt in index.js

Monil Prajapatidb44b283b012
diff --git a/apps/OpenSign/src/redux/actions/index.js b/apps/OpenSign/src/redux/actions/index.js
index 1901f16c4..8a5734ef9 100644
--- a/apps/OpenSign/src/redux/actions/index.js
+++ b/apps/OpenSign/src/redux/actions/index.js
@@ -8,8 +8,10 @@ export const fetchAppInfo = (str, burl, app_id) => async (dispatch) => {
Parse.initialize(app_id);
const response = appInfo;
- let _base = response.baseurl.charAt(response.baseurl.length - 1);
- localStorage.removeItem("baseUrl");
+ let _base = ""; // Define _base here and initialize it to an empty string
+ if (response && response.baseurl) {
+ _base = response.baseurl.charAt(response.baseurl.length - 1);
+ } localStorage.removeItem("baseUrl");
localStorage.setItem("_appName", response.appname);
localStorage.setItem("_app_objectId", response.objectId);
if (_base === "/") {