File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2727 ],
2828 "dependencies" : {
2929 "@microlink/hover-react" : " ^5.5.14" ,
30- "is- localhost-url" : " ~1.0.3 "
30+ "localhost-url-regex " : " ~1.0.4 "
3131 },
3232 "devDependencies" : {
3333 "@rollup/plugin-commonjs" : " latest" ,
Original file line number Diff line number Diff line change 1- import React from 'react'
2- import ReactDOM from 'react-dom'
3- import styled from 'styled-components'
41import MicrolinkHover from '@microlink/hover-react'
5- import isLocalhostUrl from 'is-localhost-url'
2+ import localhostUrl from 'localhost-url-regex'
3+ import styled from 'styled-components'
4+ import ReactDOM from 'react-dom'
5+ import React from 'react'
66
77function toArray ( selector ) {
88 const collection = Array . from (
@@ -16,7 +16,7 @@ function toArray (selector) {
1616 el . href = new URL ( el . href ) . toString ( )
1717 return el
1818 } )
19- . filter ( el => el . href . startsWith ( 'http' ) && ! isLocalhostUrl ( el . href ) )
19+ . filter ( el => el . href . startsWith ( 'http' ) && ! localhostUrl ( ) . test ( el . href ) )
2020}
2121
2222function parseJSON ( value ) {
Original file line number Diff line number Diff line change 2525 ],
2626 "dependencies" : {
2727 "@microlink/mql" : " ~0.10.30" ,
28- "is- localhost-url" : " ~1.0.3 " ,
28+ "localhost-url-regex " : " ~1.0.4 " ,
2929 "nanoclamp" : " ~2.0.4"
3030 },
3131 "devDependencies" : {
Original file line number Diff line number Diff line change 11import { fetchFromApi , getApiUrl as createApiUrl } from '@microlink/mql'
2- import isLocalhostUrl from 'is- localhost-url'
2+ import localhostUrl from 'localhost-url-regex '
33import { css } from 'styled-components'
44
55export const isSSR = typeof window === 'undefined'
@@ -81,7 +81,7 @@ export const isLarge = cardSize => cardSize === 'large'
8181export const isSmall = cardSize => cardSize === 'small'
8282
8383export const imageProxy = url =>
84- isLocalhostUrl ( url )
84+ localhostUrl ( ) . test ( url )
8585 ? url
8686 : `https://images.weserv.nl/?${ new URLSearchParams ( {
8787 url,
You can’t perform that action at this time.
0 commit comments