Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
fix(app): use polyfilled assign
Browse files Browse the repository at this point in the history
  • Loading branch information
devinus committed Nov 27, 2018
1 parent 23f427a commit ff34486
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
17 changes: 9 additions & 8 deletions app/helpers/-assert-implicit-component-helper-argument.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);
3 changes: 2 additions & 1 deletion app/validators/account.js
@@ -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 }));
}
3 changes: 2 additions & 1 deletion app/validators/seed.js
@@ -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.