fix(chore): use $document instead of document