Update todo.js

updated the extend logic by prevent the change of a Native object.