SyntaxError: unreachable code after return statement

460 views
Skip to first unread message

Paul Hastings

unread,
Sep 4, 2015, 3:05:28 PM9/4/15
to Flambe
I've started getting this error in Firefox:

SyntaxError: unreachable code after return statement

which points to this line of code:

return new flambe_platform_html_CanvasRenderer(canvas);
		flambe_Log.error("No renderer available!");
		return null;

the game still plays but prevents any traces from being viewable. It doesn't happen in chrome. Is anyone else having this issue?



jongra...@gmail.com

unread,
Sep 24, 2015, 7:45:49 PM9/24/15
to Flambe
You have two return statements without conditionals.

return new flambe_platform_html_CanvasRenderer(canvas); ends the method

flambe_Log.error("No renderer available!"); never gets called
return null; never gets called

Reply all
Reply to author
Forward
0 new messages