mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 14:08:23 +00:00
eslint: Replace empty-returns with consistent-return.
Instead of prohibiting ‘return undefined’ (#8669), we require that a function must return an explicit value always or never. This prevents you from forgetting to return a value in some cases. It will also be important for TypeScript, which distinguishes between undefined and void. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
fe66aef0ad
commit
d72423ef21
@@ -47,9 +47,9 @@ exports.message_content = get_or_set("compose-textarea", true);
|
||||
exports.private_message_recipient = function (value) {
|
||||
if (typeof value === "string") {
|
||||
compose_pm_pill.set_from_emails(value);
|
||||
} else {
|
||||
return compose_pm_pill.get_emails();
|
||||
return undefined;
|
||||
}
|
||||
return compose_pm_pill.get_emails();
|
||||
};
|
||||
|
||||
exports.has_message_content = function () {
|
||||
|
||||
Reference in New Issue
Block a user