@chat21/chat21-web-widget 5.1.0-rc17 → 5.1.0-rc18
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.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1977,8 +1977,13 @@ export class GlobalSettingsService {
|
|
|
1977
1977
|
}
|
|
1978
1978
|
|
|
1979
1979
|
manageLoadingDomains(): boolean {
|
|
1980
|
+
const { allowedOnSpecificUrl, allowedOnSpecificUrlList } = this.globals;
|
|
1981
|
+
|
|
1982
|
+
if(!allowedOnSpecificUrl){
|
|
1983
|
+
return true
|
|
1984
|
+
}
|
|
1980
1985
|
|
|
1981
|
-
if
|
|
1986
|
+
if (!Array.isArray(allowedOnSpecificUrlList) || allowedOnSpecificUrlList.length === 0) {
|
|
1982
1987
|
console.log('allowedOnSpecificUrl is true and allowedOnSpecificUrlList is empty or not set');
|
|
1983
1988
|
return true
|
|
1984
1989
|
}
|
|
@@ -1992,7 +1997,7 @@ export class GlobalSettingsService {
|
|
|
1992
1997
|
}
|
|
1993
1998
|
|
|
1994
1999
|
const currentUrl = this.globals.windowContext.location.href;
|
|
1995
|
-
const shouldShow =
|
|
2000
|
+
const shouldShow = allowedOnSpecificUrlList.some(pattern => {
|
|
1996
2001
|
const regex = wildcardToRegex(pattern);
|
|
1997
2002
|
return regex.test(currentUrl);
|
|
1998
2003
|
});
|