import Ember from 'ember';

export default Ember.Component.extend({
  didInsertElement() {
    var nav = Ember.$('body');
    let scrolled = false;

    Ember.$(window).scroll(function () {
      if (200 < Ember.$(window).scrollTop() && !scrolled) {
        nav.addClass('fixed');
        Ember.$('.banner__header').animate({top: 0}, 0);
        scrolled = true;
      }

      if (200 > Ember.$(window).scrollTop() && scrolled) {
        nav.removeClass('fixed');
        Ember.$('.banner__header').removeAttr('style');
        scrolled = false;
      }
    });
  }
});

@@ -92,11 +92,11 @@
     
-var
+let
  nav

change var to let