mozilla/pdf.js — pull request #4796 by Snuffleupagus (2014-05-14 11:01:28+00:00)
Title: Check if the Names dictionary actually contains a Dests dictionary before attempting to get the destinations

Currently the unit test for `getDestinations` is partially disabled, see https://github.com/mozilla/pdf.js/blob/master/test/unit/api_spec.js#L68.

The problem with the file [basicapi.pdf](https://github.com/mozilla/pdf.js/blob/master/test/pdfs/basicapi.pdf) is that the `Names` dictionary is empty, so this PR makes sure that we check that before attempting to get the `Dests`.
This PR thus makes it possible to fix a, currently meaningless, unit test.