diff --git a/packages/dnb-design-system-portal/src/docs/welcome-advice.md b/packages/dnb-design-system-portal/src/docs/welcome-advice.md index 2497ffe8e67..2ed8930eae1 100644 --- a/packages/dnb-design-system-portal/src/docs/welcome-advice.md +++ b/packages/dnb-design-system-portal/src/docs/welcome-advice.md @@ -1,6 +1,6 @@ --- title: 'Welcome Info' -search: false +skipSearch: true --- ## Please Contribute diff --git a/packages/dnb-design-system-portal/src/uilib/search/searchQuery.js b/packages/dnb-design-system-portal/src/uilib/search/searchQuery.js index 380fdb92e2b..15b1417c2d2 100644 --- a/packages/dnb-design-system-portal/src/uilib/search/searchQuery.js +++ b/packages/dnb-design-system-portal/src/uilib/search/searchQuery.js @@ -19,6 +19,7 @@ const docsQuery = /* GraphQL */ ` title description search + skipSearch } headings { value @@ -48,9 +49,9 @@ const flatten = arr => ({ node: { fields: { slug }, - frontmatter: { search } + frontmatter: { skipSearch } } - }) => !slug.includes('not_in_use') && search !== false + }) => !slug.includes('not_in_use') && skipSearch !== true ) .map( ({ node: { children, fields, frontmatter, headings, ...rest } }) => { diff --git a/packages/dnb-ui-lib/src/components/number/Number.js b/packages/dnb-ui-lib/src/components/number/Number.js index 6b67fbd87a5..bab835f6f6f 100644 --- a/packages/dnb-ui-lib/src/components/number/Number.js +++ b/packages/dnb-ui-lib/src/components/number/Number.js @@ -414,7 +414,10 @@ const enhanceSR = (value, aria) => { export const formatNumber = (number, locale, options = {}) => { try { - if (typeof Number.toLocaleString === 'function') { + if ( + typeof Number !== 'undefined' && + typeof Number.toLocaleString === 'function' + ) { return parseFloat(number).toLocaleString(locale, options) } else if ( typeof Intl !== 'undefined' && @@ -428,7 +431,8 @@ export const formatNumber = (number, locale, options = {}) => { number, locale, options - ])}` + ])}`, + e ) } return number