diff options
| author | lost+skunk <[email protected]> | 2024-06-14 20:05:21 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-06-14 20:05:21 +0300 |
| commit | cec788554afe20b8c67357ede087b3c5c543be89 (patch) | |
| tree | b41e26b4e2c50cb1159c0084d2800793ca278046 /deviantion.go | |
| parent | 8f645d7ccb01c15650958f2f9dd14f15f9afd72b (diff) | |
| download | devianter-cec788554afe20b8c67357ede087b3c5c543be89.tar.gz devianter-cec788554afe20b8c67357ede087b3c5c543be89.tar.bz2 devianter-cec788554afe20b8c67357ede087b3c5c543be89.zip | |
Daily Deviations
Diffstat (limited to 'deviantion.go')
| -rw-r--r-- | deviantion.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/deviantion.go b/deviantion.go index 9e17da2..19405a4 100644 --- a/deviantion.go +++ b/deviantion.go @@ -97,8 +97,10 @@ func UrlFromMedia(m media) string { url.WriteString("image") url.WriteString(".gif") } - url.WriteString("?token=") - url.WriteString(m.Token[0]) + if len(m.Token) > 0 { + url.WriteString("?token=") + url.WriteString(m.Token[0]) + } } } return url.String() |
