Skip to content

Commit 10f3703

Browse files
committed
fix: fix maximum call stack size exceeded with ng build --prod
Fix #440
1 parent 4de8c7f commit 10f3703

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.travis.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ notifications:
77
email: false
88
node_js:
99
- '10'
10-
before_install:
11-
- export DISPLAY=:99.0
12-
- sh -e /etc/init.d/xvfb start
10+
services:
11+
- xvfb
1312
before_script:
1413
- npm prune
1514
script:

src/lib/dl-date-time-input/dl-date-time-input.directive.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ import {DlDateTimeInputChange} from './dl-date-time-input-change';
1818
*/
1919
const moment = _moment;
2020

21-
/**
22-
* @internal
23-
*/
24-
const alwaysTrueInputFilter: (value: any) => boolean = () => true;
25-
2621
/**
2722
* This directive allows the user to enter dates, using the keyboard, into an input box and
2823
* angular will then store a date value in the model.
@@ -40,10 +35,10 @@ export class DlDateTimeInputDirective<D> implements ControlValueAccessor, Valida
4035

4136
/* tslint:disable:member-ordering */
4237
private _filterValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {
43-
return (this._inputFilter || alwaysTrueInputFilter)(this._value) ?
38+
return (this._inputFilter || (() => true))(this._value) ?
4439
null : {'dlDateTimeInputFilter': {'value': control.value}};
4540
}
46-
private _inputFilter: (value: (D | null)) => boolean = alwaysTrueInputFilter;
41+
private _inputFilter: (value: (D | null)) => boolean = () => true;
4742
private _isValid = true;
4843
private _parseValidator: ValidatorFn = (): ValidationErrors | null => {
4944
return this._isValid ?

0 commit comments

Comments
 (0)