New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tabs): better handling of animationDuration without units #14778

Merged
merged 1 commit into from Jan 14, 2019

Conversation

Projects
None yet
5 participants
@crisbeto
Copy link
Member

crisbeto commented Jan 10, 2019

Based off of the discussions on #13428. Handles values passed to animationDuration that don't have units, rather than allowing them to continue through to the BrowserAnimationsModule and to throw an error.

@Input()
get animationDuration(): string { return this._animationDuration; }
set animationDuration(value: string) {
this._animationDuration = (typeof value === 'number' || !cssUnitPattern.test(value)) ?

This comment has been minimized.

@jelbourn

jelbourn Jan 10, 2019

Member

Is there any reason to not just check that the value matches ^\d+$?

This comment has been minimized.

@crisbeto

crisbeto Jan 10, 2019

Member

Good point, that's much more concise. Changed.

fix(tabs): better handling of animationDuration without units
Based off of the discussions on #13428. Handles values passed to `animationDuration` that don't have units, rather than allowing them to continue through to  the `BrowserAnimationsModule` and to throw an error.

@crisbeto crisbeto force-pushed the crisbeto:13428/tabs-animation-duration-units branch from 2f2addf to f1ca702 Jan 10, 2019

@jelbourn
Copy link
Member

jelbourn left a comment

LGTM

@vivian-hu vivian-hu merged commit 6f49813 into angular:master Jan 14, 2019

13 checks passed

branch-manager Checked 1 branch — 7.2.x: success
Details
ci/angular: merge status All checks passed!
ci/circleci: api_golden_checks Your tests passed on CircleCI!
Details
ci/circleci: bazel_build_test Your tests passed on CircleCI!
Details
ci/circleci: build_devapp_aot Your tests passed on CircleCI!
Details
ci/circleci: build_release_packages Your tests passed on CircleCI!
Details
ci/circleci: e2e_tests Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: prerender_build Your tests passed on CircleCI!
Details
ci/circleci: tests_browserstack Your tests passed on CircleCI!
Details
ci/circleci: tests_local_browsers Your tests passed on CircleCI!
Details
ci/circleci: tests_saucelabs Your tests passed on CircleCI!
Details
cla/google All necessary CLAs are signed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment