diff --git a/app/assets/javascripts/discourse/lib/ajax.js.es6 b/app/assets/javascripts/discourse/lib/ajax.js.es6 index 863d6eae7b1..cce7e5dcbab 100644 --- a/app/assets/javascripts/discourse/lib/ajax.js.es6 +++ b/app/assets/javascripts/discourse/lib/ajax.js.es6 @@ -133,7 +133,7 @@ export function ajax() { if(args.type && args.type.toUpperCase() !== 'GET' && !Discourse.Session.currentProp('csrfToken')){ promise = new Ember.RSVP.Promise((resolve, reject) => { ajaxObj = $.ajax(Discourse.getURL('/session/csrf'), {cache: false}) - .success(result => { + .done(result => { Discourse.Session.currentProp('csrfToken', result.csrf); performAjax(resolve, reject); });