fix(agile.js): fix wrap undefined exception