Skip to content

Commit

Permalink
refactor: this is hopefully equivalent, but clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
andylolz committed May 18, 2024
1 parent d387cad commit dd5f0d8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions output/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ Proposed [Twitter community notes](https://twitter.com/i/communitynotes/download
data: 'lang',
visible: false,
render: function (data, type, row, meta) {
if (type !== 'display') {
return data;
}
if (!data) {
return 'X unknown (deleted tweet)';
return 'X unknown (deleted)';
}
const niceName = langLookup[data];
if (niceName === 'X') {
Expand All @@ -115,10 +118,10 @@ Proposed [Twitter community notes](https://twitter.com/i/communitynotes/download
data: 'deleted',
visible: false,
render: function (data, type, row, meta) {
if (type === 'display') {
return (data === 1) ? 'Deleted' : 'Published';
if (type !== 'display') {
return data;
}
return data;
return (data === 1) ? 'Deleted' : 'Published';
}
},
{
Expand Down Expand Up @@ -147,7 +150,7 @@ Proposed [Twitter community notes](https://twitter.com/i/communitynotes/download
},
{
column: 6,
rows: [0]
rows: ['Published']
},
],
initCollapsed: true
Expand Down

0 comments on commit dd5f0d8

Please sign in to comment.