/* globals Ember */
(function() {
  const { Component, computed } = Ember;

  Component.reopen({
    __HTML_ATTRIBUTES__: computed({
      set: function(key, value) {
        let attributes = Object.keys(value);
        let customBindings = [];

        for (let i = 0; i < attributes.length; i++) {
          let attribute = attributes[i];
          customBindings.push(`__HTML_ATTRIBUTES__.${attribute}:${attribute}`);
        }

        debugger

        this.attributeBindings = this.attributeBindings.concat(customBindings);

        return value;
      }
    })
  });

})();

/* globals Ember */
(function() {
  const { Component, computed } = Ember;

  Component.reopen({
    __HTML_ATTRIBUTES__: computed({
      set: function(key, value) {
        let attributes = Object.keys(value);
        let customBindings = [];

        for (let i = 0; i < attributes.length; i++) {
          let attribute = attributes[i];
          customBindings.push(`__HTML_ATTRIBUTES__.${attribute}:${attribute}`);
        }

        if (this.attributeBindings) {
          this.attributeBindings = this.attributeBindings.concat(customBindings);
        } else {
          this.attributeBindings = customBindings;
        }

        return value;
      }
    })
  });

})();

Make work with and without pre-existing attributeBindings.
Make work with and without pre-existing attributeBindings.

When a component has no attribute bindings, `this.attributeBindings` is undefined.

This updates the computed setter to handle that scenario.
