Move this up before the last if block. We need it for the release build and there'll be errors below because `result` is `undefined`.