fix(ivy): quote dots in directive inputs and outputs (#31146)

A temporary check is in place to determine whether a key in an object
literal needs to be quoted during emit. Previously, only the presence of
a dash caused a key to become quoted, this however is not sufficient for
@angular/flex-layout to compile properly as it has dots in its inputs.

This commit extends the check to also use quotes when a dot is present.

Fixes #30114

PR Close #31146
This commit is contained in:
JoostK
2019-06-19 21:28:50 +02:00
committed by Kara Erickson
parent 4c45aa39e4
commit 75ac724842
2 changed files with 6 additions and 4 deletions

View File

@ -21,7 +21,7 @@ import {isI18nAttribute} from './i18n/util';
* TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with
* inputs that contain potentially unsafe chars.
*/
const UNSAFE_OBJECT_KEY_NAME_REGEXP = /-/;
const UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/;
/** Name of the temporary to use during data binding */
export const TEMPORARY_NAME = '_t';