throw if template is not a string

pull/31/head
Rich-Harris 8 years ago
parent 4ba76b09c2
commit ad79ce6ec5

@ -42,6 +42,10 @@ function ParseError ( message, template, index ) {
}
export default function parse ( template ) {
if ( typeof template !== 'string' ) {
throw new TypeError( 'Template must be a string' );
}
const parser = {
index: 0,
template,

Loading…
Cancel
Save