Skip to content

Commit

Permalink
Require that text-font format argument be an array of strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLoer committed Aug 8, 2018
1 parent ee4c684 commit 2cd748a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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';
Expand Down Expand Up @@ -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});
Expand Down

0 comments on commit 2cd748a

Please sign in to comment.