Skip to content

Commit

Permalink
fix: thunder link decoding error #201 #209
Browse files Browse the repository at this point in the history
close #209
  • Loading branch information
agalwood committed Apr 17, 2019
1 parent 8744070 commit 886acc2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/shared/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,10 @@ export function decodeThunderLink (url = '') {
return url
}

let result = url.split('thunder://')[1]
let result = url.trim()
result = result.split('thunder://')[1]
result = Buffer.from(result, 'base64').toString('utf8')
result = result.substring(0, result.length - 2)
result = result.substring(2, result.length - 2)
return result
}

Expand Down

0 comments on commit 886acc2

Please sign in to comment.