Skip to content
Permalink
Browse files

fix(app): use polyfilled assign

  • Loading branch information...
devinus committed Nov 27, 2018
1 parent 23f427a commit ff3448661c162a0bb2d74951a4d02785872bbcd3
Showing with 13 additions and 10 deletions.
  1. +9 −8 app/helpers/-assert-implicit-component-helper-argument.js
  2. +2 −1 app/validators/account.js
  3. +2 −1 app/validators/seed.js
@@ -1,14 +1,15 @@
import { warn } from '@ember/debug';
import { helper } from '@ember/component/helper';

const name = '-assert-implicit-component-helper-argument';
function helperFn(params) {
const [node, error] = params;
warn(error);
return node;
}

const helperFn = {
[name](params) {
const [node, error] = params;
warn(error);
return node;
},
}[name];
// https://github.com/emberjs/ember.js/issues/17154
Object.defineProperty(helperFn, 'name', {
value: '-assert-implicit-component-helper-argument',
});

export default helper(helperFn);
@@ -1,7 +1,8 @@
import { assign } from '@ember/polyfills';
import { validateFormat } from 'ember-changeset-validations/validators';

export const regex = /^(xrb|nano)(_|-)[13]((?![lv])[a-z1-9]){59}$/;

export default function validateAccount(options = {}) {
return validateFormat(Object.assign({}, options, { regex }));
return validateFormat(assign({}, options, { regex }));
}
@@ -1,7 +1,8 @@
import { assign } from '@ember/polyfills';
import { validateFormat } from 'ember-changeset-validations/validators';

export const regex = /^[a-fA-F0-9]{64}$/;

export default function validateSeed(options = {}) {
return validateFormat(Object.assign({}, options, { regex }));
return validateFormat(assign({}, options, { regex }));
}

0 comments on commit ff34486

Please sign in to comment.
You can’t perform that action at this time.