we now use the correct deadline for this if check

I'll explain inline.
We need to wrap this in an if-statement to avoid a Javascript error.  (The page will still work if we get the error, but we should really avoid Javascript errors.)