Protect against JS error when langlinks API query returns an error

This happens e.g. when opening VE on a redirect page.

Change-Id: I75b77da42013c3d446cbc9c57aebe0907a2b40dc
Merge "Protect against JS error when langlinks API query returns an error"