This variable is not used. Maybe you should also use it in the line under?
If you tested the fix and it works even with a missing line, than maybe this is not the good fix :).

Also, $util.encodeURI is deprecated, use $escapetool.url() instead.