Page MenuHomePhabricator

D7940.id26864.diff
No OneTemporary

D7940.id26864.diff

diff --git a/lib/shared/edit-messages-utils.js b/lib/shared/edit-messages-utils.js
--- a/lib/shared/edit-messages-utils.js
+++ b/lib/shared/edit-messages-utils.js
@@ -1,6 +1,5 @@
// @flow
-import invariant from 'invariant';
import * as React from 'react';
import { threadIsPending, threadHasPermission } from './thread-utils.js';
@@ -23,7 +22,7 @@
import { useSelector } from '../utils/redux-utils.js';
function useEditMessage(): (
- messageID?: string,
+ messageID: string,
newText: string,
) => Promise<SendEditMessageResult> {
const callEditMessage = useServerCall(sendEditMessage);
@@ -31,8 +30,6 @@
return React.useCallback(
(messageID, newText) => {
- invariant(messageID, 'messageID should be set!');
-
const editMessagePromise = (async () => {
const result = await callEditMessage({
targetMessageID: messageID,

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 3:54 AM (20 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573788
Default Alt Text
D7940.id26864.diff (882 B)

Event Timeline