Fix rendering static assets when an error is detected

This commit is contained in:
Daniel Berteaud 2015-06-29 19:23:23 +02:00
parent 14b6298d77
commit a018b2bf29
1 changed files with 2 additions and 1 deletions

View File

@ -2124,7 +2124,8 @@ app->hook(before_dispatch => sub {
$self->stash(config => $config);
# Check db is available
if ($error){
# But don't error when user requests static assets
if ($error && @{$self->req->url->path->parts}[-1] !~ m/\.(css|js|png|woff2?|mp3|localize\/.*)$/){
return $self->render('error',
msg => $self->l($error),
err => $error,