added fix for #286
added spec test to confirm that orderByPriority filter errors in safari
changed if statement to satisfy jshint
Merge pull request #288 from twilson63/master

Fix for issue #286 (make sure child is object before adding $priority)