bahai-reflib-data-server
Advanced tools
Comparing version 0.7.1 to 0.8.0
# CHANGES for `bahai-reflib-data-server` | ||
## 0.8.0 | ||
- feat: allow `redirectHandler` for custom redirecting | ||
## 0.7.1 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "bahai-reflib-data-server", | ||
"version": "0.7.1", | ||
"version": "0.8.0", | ||
"author": "Brett Zamir <brettz9@yahoo.com>", | ||
@@ -5,0 +5,0 @@ "contributors": [], |
@@ -64,3 +64,4 @@ import '../components/fetch-select.js'; | ||
* subsectionUrlForWorkFetch: JsonFetcher, | ||
* urlForWorkFetch: JsonFetcher | ||
* urlForWorkFetch: JsonFetcher, | ||
* redirectHandler: (string) => void | ||
* }} obj | ||
@@ -72,4 +73,7 @@ * @returns {ChooseWorkSectionParagraph} | ||
urlForIdFetch, idForWorkSectionAndParagraphFetch, | ||
subsectionUrlForWorkFetch, urlForWorkFetch | ||
subsectionUrlForWorkFetch, urlForWorkFetch, redirectHandler | ||
} = {}) { | ||
const redirector = redirectHandler || ((str) => { | ||
location.href = str; | ||
}); | ||
/** | ||
@@ -237,3 +241,3 @@ * | ||
} | ||
location.href = url; | ||
redirector(url); | ||
return; | ||
@@ -285,3 +289,3 @@ } | ||
if (redirect) { | ||
location.href = `https://bahai.org/r/${id}`; | ||
redirector(`https://bahai.org/r/${id}`); | ||
} else { | ||
@@ -342,3 +346,3 @@ this.id = id; | ||
location.href = url; | ||
redirector(url); | ||
} | ||
@@ -345,0 +349,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44421
1179