mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
6570c06f5d
commit
3d2f62ae59
1 changed files with 5 additions and 5 deletions
|
|
@ -33,11 +33,11 @@ impl Utils {
|
||||||
lua.create_function(|lua, ()| {
|
lua.create_function(|lua, ()| {
|
||||||
let block = lua.named_registry_value::<RtRef>("rt")?.next_block();
|
let block = lua.named_registry_value::<RtRef>("rt")?.next_block();
|
||||||
lua.create_async_function(move |lua, args: Variadic<Value>| async move {
|
lua.create_async_function(move |lua, args: Variadic<Value>| async move {
|
||||||
if let Some(cur) = lua.named_registry_value::<RtRef>("rt")?.current.clone() {
|
let Some(cur) = lua.named_registry_value::<RtRef>("rt")?.current.clone() else {
|
||||||
|
return Err("`ya.sync()` must be called in a plugin").into_lua_err();
|
||||||
|
};
|
||||||
|
|
||||||
Self::retrieve(cur, block, args).await
|
Self::retrieve(cur, block, args).await
|
||||||
} else {
|
|
||||||
Err("`ya.sync()` must be called in a plugin").into_lua_err()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})?,
|
})?,
|
||||||
)?;
|
)?;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue