mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-31 01:36:11 +00:00
committed by
Nicolas Gallagher
parent
e1b576e427
commit
efe18f1b7e
+6
-1
@@ -37,7 +37,12 @@ const open = url => {
|
|||||||
anchor.target = '_blank'; // :(
|
anchor.target = '_blank'; // :(
|
||||||
anchor.rel = 'noopener';
|
anchor.rel = 'noopener';
|
||||||
anchor.href = url;
|
anchor.href = url;
|
||||||
anchor.click();
|
const body = document.body;
|
||||||
|
if (body) {
|
||||||
|
body.appendChild(anchor);
|
||||||
|
anchor.click();
|
||||||
|
body.removeChild(anchor);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Linking;
|
export default Linking;
|
||||||
|
|||||||
Reference in New Issue
Block a user