Page MenuHomePhabricator

D4316.diff
No OneTemporary

D4316.diff

diff --git a/lib/utils/text-utils.js b/lib/utils/text-utils.js
--- a/lib/utils/text-utils.js
+++ b/lib/utils/text-utils.js
@@ -14,7 +14,7 @@
const comma = maxNumberOfNouns > 2 && nouns.length > 2 ? ',' : '';
if (nouns.length <= maxNumberOfNouns) {
- const prefix = nouns.slice(0, nouns.length - 1).join(', ');
+ const prefix = nouns.slice(0, -1).join(', ');
return `${prefix}${comma} and ${nouns[nouns.length - 1]}`;
} else {
const prefix = nouns.slice(0, maxNumberOfNouns - 1).join(', ');
diff --git a/web/modals/modal-provider.react.js b/web/modals/modal-provider.react.js
--- a/web/modals/modal-provider.react.js
+++ b/web/modals/modal-provider.react.js
@@ -30,7 +30,7 @@
$ReadOnlyArray<[React.Node, string]>,
>([]);
const popModal = React.useCallback(
- () => setModals(oldModals => oldModals.slice(0, oldModals.length - 1)),
+ () => setModals(oldModals => oldModals.slice(0, -1)),
[],
);
const pushModal = React.useCallback(newModal => {

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 12:17 AM (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577778
Default Alt Text
D4316.diff (999 B)

Event Timeline