javascript - backbone set module going into infilinte loop - backbon -


i not getting why page going on infinite loop.

contentapi: {         url: 'testurl',         type: 'get',         done (response, module) {            var data = {content: {}};             response.elements.foreach(el => {                 if(el.id == 'claims_center_btn_download_all')                     el.url = module.claimsapi.proxy.baseurl + 'download/forms/package';                  data.content[el.id] = el;              })             module.data.set('content', response);         }     } 

any appreciable

i think there syntax issue, done looks should declared property:

contentapi: {     url: 'testurl',     type: 'get',     done: function (response, module) {        var data = {content: {}};         response.elements.foreach(el => {             if(el.id == 'claims_center_btn_download_all')                 el.url = module.claimsapi.proxy.baseurl + 'download/forms/package';              data.content[el.id] = el;          })         module.data.set('content', response);     } } 

Comments