Snippet as enable condition

If you are getting an exception, then there is likely something wrong with the javascript code.  Can you paste provide the full JS you tried to use that included the return statement?