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