Skip to content

Commit 4e9ed00

Browse files
authored
Merge pull request #768 from CleanTalk/fix_altsession_ct_checkjs_av
Fix. AltSession. Correcting the issue of array conversion
2 parents d3c4644 + c8be82a commit 4e9ed00

18 files changed

Lines changed: 57 additions & 35 deletions

js/apbct-public-bundle.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_ext-protection.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_ext-protection_gathering.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_full-protection.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_full-protection_gathering.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_gathering.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_int-protection.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/apbct-public-bundle_int-protection_gathering.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/prebuild/apbct-public-bundle.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,10 +2401,12 @@ let apbctLocalStorage = {
24012401
const json = JSON.parse(storageValue);
24022402
if ( json.hasOwnProperty(property) ) {
24032403
try {
2404-
// if property can be parsed as JSON - do it
2405-
return JSON.parse( json[property] );
2404+
const parsed = JSON.parse( json[property] );
2405+
if ( parsed !== null && typeof parsed === 'object' ) {
2406+
return json[property].toString();
2407+
}
2408+
return parsed;
24062409
} catch (e) {
2407-
// if not - return string of value
24082410
return json[property].toString();
24092411
}
24102412
} else {

js/prebuild/apbct-public-bundle_ext-protection.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,10 +2401,12 @@ let apbctLocalStorage = {
24012401
const json = JSON.parse(storageValue);
24022402
if ( json.hasOwnProperty(property) ) {
24032403
try {
2404-
// if property can be parsed as JSON - do it
2405-
return JSON.parse( json[property] );
2404+
const parsed = JSON.parse( json[property] );
2405+
if ( parsed !== null && typeof parsed === 'object' ) {
2406+
return json[property].toString();
2407+
}
2408+
return parsed;
24062409
} catch (e) {
2407-
// if not - return string of value
24082410
return json[property].toString();
24092411
}
24102412
} else {

0 commit comments

Comments
 (0)