Skip to content

Commit 9a14b29

Browse files
committed
Fix status msg duplication possibility
1 parent 65f6ab1 commit 9a14b29

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/components/Status/Status.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,24 @@ export const AppToaster = Toaster.create({
1414
position: Position.BOTTOM_RIGHT,
1515
})
1616

17+
let lastShownMsg = null
18+
1719
export const Status = ({
1820
clearStatus,
1921
intent,
2022
msg = {},
2123
}) => {
2224
if (!msg.id) {
25+
lastShownMsg = null
2326
return ''
2427
}
2528

29+
if (msg === lastShownMsg) {
30+
return ''
31+
}
32+
33+
lastShownMsg = msg
34+
2635
const params = {
2736
...msg,
2837
topic: msg.topic ? i18n.t(msg.topic) || msg.topic : undefined,

0 commit comments

Comments
 (0)