mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-30 08:50:26 +01:00
treat returned false bool from a jsvm hook as hook.stopPropagation
This commit is contained in:
1 parent
4962dc618b
commit
64d7ab22f3
2 files changed
+9
-16
No files matched your search
@@ -45,7 +45,7 @@ func TestBaseBindsCount(t *testing.T) {
|
||||
vm := goja.New()
|
||||
baseBinds(vm)
|
||||
|
||||
testBindsCount(vm, "this", 15, t)
|
||||
testBindsCount(vm, "this", 14, t)
|
||||
}
|
||||
|
||||
func TestBaseBindsRecord(t *testing.T) {
|
||||
@@ -1048,7 +1048,7 @@ func TestHooksBinds(t *testing.T) {
|
||||
}, "demo2")
|
||||
|
||||
onModelBeforeUpdate((e) => {
|
||||
return $stopPropagation
|
||||
return false
|
||||
}, "demo2")
|
||||
|
||||
onModelBeforeUpdate((e) => {
|
||||
|
||||
Reference in new issue
Block a user