Skip to content

Commit

Permalink
Merge pull request #1869 from akto-api-security/hotfix/fix_plan_type
Browse files Browse the repository at this point in the history
update plan type if present
  • Loading branch information
Ark2307 authored Dec 31, 2024
2 parents 646de5b + a180776 commit de8686f
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,19 @@ function Billing() {
default:
}

if (window.PLAN_TYPE) { $('.stigg-subscription-plan-name').text(window.PLAN_TYPE) }
if (window.PLAN_TYPE && window.PLAN_TYPE.length > 0) {
const checkForElement = () => {
const elements = document.querySelectorAll('.stigg-subscription-plan-name');
if (elements.length > 0) {
elements.forEach(element => {
element.textContent = window.PLAN_TYPE;
});
} else {
setTimeout(() => checkForElement(), 500);
}
};
checkForElement();
}
})

async function refreshUsageData(){
Expand Down

0 comments on commit de8686f

Please sign in to comment.