mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-18 05:50:43 -07:00
feat: Support for the "render" tag #163
This commit is contained in:
+2
-2
@@ -34,7 +34,7 @@ function isCustomIterable (val: any): val is IterableIterator<any> {
|
||||
return val && isFunction(val.next) && isFunction(val.throw) && isFunction(val.return)
|
||||
}
|
||||
|
||||
export function toThenable (val: IterableIterator<any> | Thenable): Thenable {
|
||||
export function toThenable (val: IterableIterator<any> | Thenable | any): Thenable {
|
||||
if (isThenable(val)) return val
|
||||
if (isCustomIterable(val)) return reduce()
|
||||
return mkResolve(val)
|
||||
@@ -61,7 +61,7 @@ export function toThenable (val: IterableIterator<any> | Thenable): Thenable {
|
||||
}
|
||||
}
|
||||
|
||||
export function toValue (val: IterableIterator<any> | Thenable) {
|
||||
export function toValue (val: IterableIterator<any> | Thenable | any) {
|
||||
let ret: any
|
||||
toThenable(val)
|
||||
.then((x: any) => {
|
||||
|
||||
Reference in New Issue
Block a user