Update dpi.js

Fixed a minor bug which would cause an error to be thrown if no `body` element is found
Merge pull request #1 from ChrisUpjohn/patch-1



Fixed a minor bug which would cause an error to be thrown if no body element is found