This is a bug, thanks a lot for catching it!!!! It should read
`if (!Y.Lang.isArray(record.commands) { record.commands = []; }`