Skip to content

Commit

Permalink
fix: fix maximum call stack size exceeded with ng build --prod
Browse files Browse the repository at this point in the history
Fix #440
  • Loading branch information
dalelotts committed Nov 4, 2019
1 parent 4de8c7f commit 10f3703
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ notifications:
email: false
node_js:
- '10'
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
services:
- xvfb
before_script:
- npm prune
script:
Expand Down
9 changes: 2 additions & 7 deletions src/lib/dl-date-time-input/dl-date-time-input.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ import {DlDateTimeInputChange} from './dl-date-time-input-change';
*/
const moment = _moment;

/**
* @internal
*/
const alwaysTrueInputFilter: (value: any) => boolean = () => true;

/**
* This directive allows the user to enter dates, using the keyboard, into an input box and
* angular will then store a date value in the model.
Expand All @@ -40,10 +35,10 @@ export class DlDateTimeInputDirective<D> implements ControlValueAccessor, Valida

/* tslint:disable:member-ordering */
private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {
return (this._inputFilter || alwaysTrueInputFilter)(this._value) ?
return (this._inputFilter || (() => true))(this._value) ?
null : {'dlDateTimeInputFilter': {'value': control.value}};
}
private _inputFilter: (value: (D | null)) => boolean = alwaysTrueInputFilter;
private _inputFilter: (value: (D | null)) => boolean = () => true;
private _isValid = true;
private _parseValidator: ValidatorFn = (): ValidationErrors | null => {
return this._isValid ?
Expand Down

0 comments on commit 10f3703

Please sign in to comment.