mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 12:50:38 -07:00
fix: report error for malformed else/elsif/endif/endfor, #713
This commit is contained in:
@@ -8,3 +8,7 @@ export function assert <T> (predicate: T | null | undefined, message?: string |
|
||||
throw new AssertionError(msg)
|
||||
}
|
||||
}
|
||||
|
||||
export function assertEmpty<T> (predicate: T | null | undefined, message = `unexpected ${JSON.stringify(predicate)}`) {
|
||||
assert(!predicate, message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user