[fix] Linking.openURL on Firefox

Fix #883
Close #884
This commit is contained in:
Bruno Lemos
2018-04-01 07:54:01 -03:00
committed by Nicolas Gallagher
parent e1b576e427
commit efe18f1b7e

View File

@@ -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;