fix redirect to 404
parent
b797fdd1d8
commit
adae20b9ab
|
@ -14,6 +14,9 @@ class Redirecter extends Component {
|
||||||
axios.get(`https://link.timka.su?link=${linkName}`).then(
|
axios.get(`https://link.timka.su?link=${linkName}`).then(
|
||||||
function (response) {
|
function (response) {
|
||||||
const json = response.data[0]
|
const json = response.data[0]
|
||||||
|
if (json === undefined) {
|
||||||
|
window.location.href = '/404'
|
||||||
|
}
|
||||||
console.log(json)
|
console.log(json)
|
||||||
window.location.href = json.url
|
window.location.href = json.url
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue