fix(animations): throw errors and normalize offset beyond the range of [0,1]
Closes #13348 Closes #13440
This commit is contained in:

committed by
Victor Berchet

parent
8395f0e138
commit
b56474d067
@ -174,6 +174,11 @@ function _normalizeStyleMetadata(
|
||||
entry: CompileAnimationStyleMetadata, stateStyles: {[key: string]: AnimationStylesAst},
|
||||
schema: ElementSchemaRegistry, errors: AnimationParseError[],
|
||||
permitStateReferences: boolean): {[key: string]: string | number}[] {
|
||||
const offset = entry.offset;
|
||||
if (offset > 1 || offset < 0) {
|
||||
errors.push(new AnimationParseError(`Offset values for animations must be between 0 and 1`));
|
||||
}
|
||||
|
||||
const normalizedStyles: {[key: string]: string | number}[] = [];
|
||||
entry.styles.forEach(styleEntry => {
|
||||
if (typeof styleEntry === 'string') {
|
||||
|
Reference in New Issue
Block a user