The if conditions at lines 201 and 203 must probably be corrected.
from : if ( page.missing )
to : if ( page.missing !== undefined )
and
from : if ( page.invalid )
to : if ( page.invalid !== undefined )
This code checks the api query result,
which, for instance, has
page.missing === ""
if queried title doesn't exist.
As it is, the "Insert link" dialog shows "Page exists"
for every title inserted in the "Target page or URL:" field.
Version: unspecified
Severity: normal