Merge pull request #26 from NebulousLabs/fix-skylink-with-sia-prefix

fix new window url when pasting skylink with sia:// prefix
This commit is contained in:
Peter-Jan Brone 2020-02-18 10:39:19 +01:00 committed by GitHub
commit 2ee1671aec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ export default class HomeUpload extends Component {
const skylink = event.target.skylink.value.replace('sia://', '') const skylink = event.target.skylink.value.replace('sia://', '')
if (skylink.match(/^[a-zA-Z0-9_-]{46}$/)) { if (skylink.match(/^[a-zA-Z0-9_-]{46}$/)) {
window.open(`/${event.target.skylink.value}`, '_blank') window.open(skylink, '_blank')
} }
} }