Fix notice: $targetPageExists undefined

Change-Id: I708a20d6fd5f105725685893b574c3eb4e44faa7