tldts 7.4.26 → 7.4.27

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/dist/cjs/index.js CHANGED
@@ -906,7 +906,9 @@ function parseImpl(url, step, suffixLookup, partialOptions, result) {
906
906
  function fastPathLookup (hostname, options, out) {
907
907
  // Fast path for very popular suffixes; this allows to by-pass lookup
908
908
  // completely as well as any extra allocation or string manipulation.
909
- if (!options.allowPrivateDomains && hostname.length > 3) {
909
+ if (!options.allowPrivateDomains &&
910
+ options.allowIcannDomains &&
911
+ hostname.length > 3) {
910
912
  const last = hostname.length - 1;
911
913
  const c3 = hostname.charCodeAt(last);
912
914
  const c2 = hostname.charCodeAt(last - 1);