From ea7583811ad955a0171f6c6f571623e06639e214 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 26 Oct 2015 09:31:42 -0400 Subject: [PATCH] Use arrow function to preserve this. This previously caused an error when saving because `this` wasn't being preserved. Prior error: ![screenshot](https://monosnap.com/file/QmrPw2dESDWzGmyHE9KKbE3RX3D0Ss.png) --- app/gist/route.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/gist/route.js b/app/gist/route.js index 4c2a1a6d..fdaa8db1 100644 --- a/app/gist/route.js +++ b/app/gist/route.js @@ -30,7 +30,7 @@ export default Ember.Route.extend({ gist.save().then(() => { this.get('notify').info(`Saved to Gist ${gist.get('id')} on Github`); if(newGist) { - this.transitionTo('gist.edit', gist).then(function() { + this.transitionTo('gist.edit', gist).then(() => { this.send('setSaved'); }); } else {