Update DisplayObject.js

Change conditional operator "?" to "if" statement.