{"action":"closed","issue":{"url":"https://api.github.com/repos/jiesa/jiesa/issues/3","labels_url":"https://api.github.com/repos/jiesa/jiesa/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/jiesa/jiesa/issues/3/comments","events_url":"https://api.github.com/repos/jiesa/jiesa/issues/3/events","html_url":"https://github.com/jiesa/jiesa/issues/3","id":103025542,"number":3,"title":"empty href attribute is lost after update()","user":{"login":"gaydenko","id":3740016,"avatar_url":"https://avatars.githubusercontent.com/u/3740016?v=3","gravatar_id":"","url":"https://api.github.com/users/gaydenko","html_url":"https://github.com/gaydenko","followers_url":"https://api.github.com/users/gaydenko/followers","following_url":"https://api.github.com/users/gaydenko/following{/other_user}","gists_url":"https://api.github.com/users/gaydenko/gists{/gist_id}","starred_url":"https://api.github.com/users/gaydenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaydenko/subscriptions","organizations_url":"https://api.github.com/users/gaydenko/orgs","repos_url":"https://api.github.com/users/gaydenko/repos","events_url":"https://api.github.com/users/gaydenko/events{/privacy}","received_events_url":"https://api.github.com/users/gaydenko/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-25T13:45:07Z","updated_at":"2015-08-25T14:09:59Z","closed_at":"2015-08-25T14:09:59Z","body":"Hi The same test case as in https://github.com/jiesa/jiesa/issues/2 can be used to get this issue: after clicking on the anchor with `href` attribute equal to empty string, `update()` call results in this attribute disappearing.\r\nTo reduce clicks I place the test case here:\r\n```js\r\n<html>\r\n  <div>Jiesa test case</div>\r\n  <div id='id'></div>\r\n  <script src=\"./jiesa/dist/jiesa.js\"></script>\r\n  <script>\r\n    var tree = new jiesa.Tree();\r\n    jiesa.initEvent();\r\n    var mountId = null;\r\n    var disabled = false;\r\n\r\n    function onClick(ev) {\r\n      disabled = !disabled;\r\n      tree.update(mountId);\r\n      console.log('updated with disabled === ' + disabled);\r\n      ev.preventDefault();\r\n      return false;\r\n    }\r\n\r\n    var view = function() {\r\n      return new jiesa.Element('div', {}, [\r\n        new jiesa.Element('input', {attrs:{type:'checkbox'},props:{checked:disabled}}),\r\n        new jiesa.Element('input', {props:{value:'initial text', disabled:disabled}}),\r\n        new jiesa.Element(\r\n          'a',\r\n          {attrs:{href:''}, events:{click:onClick}},\r\n          [new jiesa.Text(\"<--- toggle field enabling\")]\r\n        )\r\n      ]);\r\n    }\r\n\r\n    mountId = tree.mount(document.getElementById('id'), view);\r\n  </script>\r\n</html>\r\n```"}}