Proper referential equality check in editor.js

This fixes #256 and #304 by adding a proper object equality check in editor.setProperty