Update ResourceView.js

fixed invalid resource object, resource element and view when renderResource callback is used.