From 2380aa094f1da447a44a3b6737cd9bcf406dcb24 Mon Sep 17 00:00:00 2001 From: Tom Locke Date: Tue, 26 Mar 2019 14:29:41 +0000 Subject: [PATCH] Clarify semantics of return from deserialize (#2665) This can trip folks up who are using compile-to-JS languages (ClojureScript in my case), where return semantics may be different. --- docs/reference/slate-html-serializer/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/slate-html-serializer/index.md b/docs/reference/slate-html-serializer/index.md index 4674bd535..da3c5b37e 100644 --- a/docs/reference/slate-html-serializer/index.md +++ b/docs/reference/slate-html-serializer/index.md @@ -81,7 +81,7 @@ Each rule must define two properties: `rule.deserialize(el: Element, next: Function) => Object || Void` -The `deserialize` function receives a DOM element and should return a plain JavaScript object representing the deserialized value, or nothing if the rule in question doesn't know how to deserialize the object, in which case the next rule in the stack will be attempted. +The `deserialize` function receives a DOM element and should return a plain JavaScript object representing the deserialized value, or nothing if the rule in question doesn't know how to deserialize the object, in which case the next rule in the stack will be attempted. Returning `null` will halt the rule chain and add nothing. To delegate to the next rule, the return value must be `undefined`. The object should be one of: