From 2cd748ab5d2f5e7369e64ac103fdd64b0fa74980 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Fri, 3 Aug 2018 14:02:10 -0700 Subject: [PATCH] Require that `text-font` format argument be an array of strings. --- src/style-spec/expression/definitions/formatted.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/style-spec/expression/definitions/formatted.js b/src/style-spec/expression/definitions/formatted.js index 9a87d99d31a..d6e517479b1 100644 --- a/src/style-spec/expression/definitions/formatted.js +++ b/src/style-spec/expression/definitions/formatted.js @@ -1,6 +1,6 @@ // @flow -import { NumberType, ValueType, FormattedType } from '../types'; +import { NumberType, ValueType, FormattedType, array, StringType } from '../types'; import type { Expression } from '../expression'; @@ -88,7 +88,7 @@ export class FormatExpression implements Expression { let font = null; if (options['text-font']) { - font = context.parse(options['text-font'], 1, ValueType); // Require array of strings? + font = context.parse(options['text-font'], 1, array(StringType)); if (!font) return null; } sections.push({text, scale, font});