- All anonymous functions must be arrow functions.
// This is ok utils.ajaxGet('/ajax/episode/info', params) .then(resp => { resolve(JSON.parse(resp)) }) .catch(err => { reject(err) }) // This is NOT ok. Arrow functions looks // much cleaner for this purpose. utils.ajaxGet('/ajax/episode/info', params) .then(function(resp){ resolve(JSON.parse(resp)) }) .catch(function(err){ reject(err) })
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.