import DS from 'ember-data';

export default DS.JSONAPISerializer.extend({
  serialize() {
    const json = this._super.apply(this, arguments);
    const password = json.data.attributes.password;
    if (typeof password === 'undefined' || password === null) {
      delete json.data.attributes.password;
    }

    return json;
  }
});

import DS from 'ember-data';

export default DS.JSONAPISerializer.extend({
  serialize(...args) {
    const json = this._super.apply(this, args);
    const password = json.data.attributes.password;
    if (typeof password === 'undefined' || password === null) {
      delete json.data.attributes.password;
    }

    return json;
  }
});

Use the rest parameters instead of arguments in account serializer