I have the following line of JQUERY:
if(html == 'html5' && pastURL == url) {return false;}
This is causing the function its within to show an error:
‘strict warning function does not always return a value’.
Is there a way to alter this so it doesn’t show this error and why is it showing this? Note: don’t have ‘use strict;’ in the code.
thx
All functions must either have no
returnstatement or their last executed line must be a return. So if you’re planning a route that will return false, make sure that the function always returns something no matter how that condition plays out. The easiest way to do this is to put a return statement at the end of the function so that it will always return if it gets there.