Skip to content

Commit b0116ee

Browse files
committed
Minor fixes
1 parent ae48bdd commit b0116ee

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

extension-manifest-v2/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"foundation-sites": "^6.6.2",
5252
"ghostery-common": "^1.3.12",
5353
"history": "^4.10.1",
54-
"hybrids": "^8.2.21",
54+
"hybrids": "^8.2.22",
5555
"linkedom": "^0.16.11",
5656
"moment": "^2.29.1",
5757
"prop-types": "^15.6.2",

extension-manifest-v3/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@ghostery/ui": "^1.0.0",
4141
"@github/relative-time-element": "^4.3.0",
4242
"@whotracksme/webextension-packages": "5.0.9",
43-
"hybrids": "^8.2.21",
43+
"hybrids": "^8.2.22",
4444
"idb": "^7.1.1",
4545
"jwt-decode": "^4.0.0",
4646
"tldts-experimental": "^6.0.19"

extension-manifest-v3/src/pages/settings/views/tracker-add-exception.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ const Model = {
2020
[store.connect]: {
2121
get: () => null,
2222
set: (id, model) => {
23-
if (!parse(model.value).domain) {
24-
throw 'The value must be a valid domain name';
23+
const parsed = parse(model.value);
24+
if (!parsed.domain && !parsed.isIp) {
25+
throw 'The value must be a valid domain name or IP address.';
2526
}
2627
return model;
2728
},
@@ -41,7 +42,7 @@ async function add({ tracker, model }, event) {
4142
store.submit(model).then(({ value }) => {
4243
return store.set(tracker.exception, {
4344
[field]: [
44-
...new Set(tracker.exception[field].concat(parse(value).domain)),
45+
...new Set(tracker.exception[field].concat(parse(value).hostname)),
4546
],
4647
});
4748
}),

package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
},
2424
"dependencies": {
2525
"@ghostery/libs": "^1.0.0",
26-
"hybrids": "^8.2.21"
26+
"hybrids": "^8.2.22"
2727
}
2828
}

0 commit comments

Comments
 (0)