ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit cd93e6bd1c97bec1406ab66ceb516bda3b5d1628
parent e713d53457887b9e1ea65fe06642e3e6e2198f2e
Author: Andranik Antonyan <andantonyan@gmail.com>
Date:   Wed, 20 Jan 2016 23:32:27 +0300

fix(routes.js): check response status.
Diffstat:
Msrc/routes.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/routes.js b/src/routes.js @@ -33,7 +33,7 @@ const router = new Router(on => { on('*', async (state) => { const response = await fetch(`/api/content?path=${state.path}`); const content = await response.json(); - return content && <ContentPage {...content} />; + return response.ok && content && <ContentPage {...content} />; }); on('error', (state, error) => state.statusCode === 404 ?