Skip to content

Commit

Permalink
Merge pull request #6059 from ProcessMaker/observation/FOUR-13195
Browse files Browse the repository at this point in the history
FOUR-13195: Fixed console error
  • Loading branch information
ryancooley authored Jan 19, 2024
2 parents b3376d2 + 61cfc38 commit 2907765
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ window.Vue.component("filter-table", FilterTable);

let translationsLoaded = false;
const mdates = JSON.parse(
document.head.querySelector("meta[name=\"i18n-mdate\"]").content,
document.head.querySelector("meta[name=\"i18n-mdate\"]")?.content,
);

// Make $t available to all vue instances
Expand Down Expand Up @@ -270,9 +270,9 @@ if (appUrl) {
if (userID) {
window.ProcessMaker.user = {
id: userID.content,
datetime_format: formatDate.content,
calendar_format: formatDate.content,
timezone: timezone.content,
datetime_format: formatDate?.content,
calendar_format: formatDate?.content,
timezone: timezone?.content,
fullName: userFullName?.content,
avatar: userAvatar?.content,
};
Expand All @@ -297,10 +297,10 @@ if (window.Processmaker && window.Processmaker.broadcasting) {

if (userID) {
// Session timeout
const timeoutScript = document.head.querySelector("meta[name=\"timeout-worker\"]").content;
window.ProcessMaker.AccountTimeoutLength = parseInt(eval(document.head.querySelector("meta[name=\"timeout-length\"]").content));
window.ProcessMaker.AccountTimeoutWarnSeconds = parseInt(document.head.querySelector("meta[name=\"timeout-warn-seconds\"]").content);
window.ProcessMaker.AccountTimeoutEnabled = document.head.querySelector("meta[name=\"timeout-enabled\"]") ? parseInt(document.head.querySelector("meta[name=\"timeout-enabled\"]").content) : 1;
const timeoutScript = document.head.querySelector("meta[name=\"timeout-worker\"]")?.content;
window.ProcessMaker.AccountTimeoutLength = parseInt(eval(document.head.querySelector("meta[name=\"timeout-length\"]")?.content));
window.ProcessMaker.AccountTimeoutWarnSeconds = parseInt(document.head.querySelector("meta[name=\"timeout-warn-seconds\"]")?.content);
window.ProcessMaker.AccountTimeoutEnabled = document.head.querySelector("meta[name=\"timeout-enabled\"]") ? parseInt(document.head.querySelector("meta[name=\"timeout-enabled\"]")?.content) : 1;
window.ProcessMaker.AccountTimeoutWorker = new Worker(timeoutScript);
window.ProcessMaker.AccountTimeoutWorker.addEventListener("message", (e) => {
if (e.data.method === "countdown") {
Expand Down

0 comments on commit 2907765

Please sign in to comment.