diff --git a/src/ReactNativeSVG.ts b/src/ReactNativeSVG.ts index 99fbf3c72..59882e64b 100644 --- a/src/ReactNativeSVG.ts +++ b/src/ReactNativeSVG.ts @@ -32,7 +32,6 @@ import { SvgUri, SvgXml, camelCase, - err, fetchText, JsxAST, Middleware, @@ -139,7 +138,6 @@ export { SvgUri, SvgXml, camelCase, - err, fetchText, Shape, RNSVGMarker, diff --git a/src/css/css.tsx b/src/css/css.tsx index a6a7a222e..b60a4c3c6 100644 --- a/src/css/css.tsx +++ b/src/css/css.tsx @@ -10,7 +10,7 @@ import type { XmlProps, XmlState, } from 'react-native-svg'; -import { camelCase, err, fetchText, parse, SvgAst } from 'react-native-svg'; +import { camelCase, fetchText, parse, SvgAst } from 'react-native-svg'; import type { Atrule, AtrulePrelude, @@ -27,6 +27,8 @@ import csstree, { List } from 'css-tree'; import type { Options } from 'css-select'; import cssSelect from 'css-select'; +const err = console.error.bind(console); + /* * Style element inlining experiment based on SVGO * https://github.com/svg/svgo/blob/11f9c797411a8de966aacc4cb83dbb3e471757bc/plugins/inlineStyles.js diff --git a/src/xml.tsx b/src/xml.tsx index 9e2352a1f..b449abc2d 100644 --- a/src/xml.tsx +++ b/src/xml.tsx @@ -105,7 +105,7 @@ export function SvgAst({ ast, override }: AstProps) { ); } -export const err = console.error.bind(console); +const err = console.error.bind(console); export function SvgXml(props: XmlProps) { const { onError = err, xml, override, fallback } = props;