mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-23 23:06:24 +00:00
committed by
Nicolas Gallagher
parent
0ac406c91e
commit
781a4191f0
@@ -110,7 +110,7 @@ describe('components/View', () => {
|
||||
const hrefAttrs = {
|
||||
download: 'filename.jpg',
|
||||
rel: 'nofollow',
|
||||
target: 'blank'
|
||||
target: '_blank'
|
||||
};
|
||||
const { container } = render(<View href="https://example.com" hrefAttrs={hrefAttrs} />);
|
||||
expect(container.firstChild).toMatchSnapshot();
|
||||
|
||||
+2
-2
@@ -107,8 +107,8 @@ const View = forwardRef<ViewProps, *>((props, forwardedRef) => {
|
||||
if (rel != null) {
|
||||
supportedProps.rel = rel;
|
||||
}
|
||||
if (typeof target === 'string' && target.charAt(0) !== '_') {
|
||||
supportedProps.target = '_' + target;
|
||||
if (typeof target === 'string') {
|
||||
supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user