Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit f1e390d

Browse files
Ignore whitespace-only ContentWarnings.
This will break the workflow of people that use `" "` or such as a CW that means "beware, but I won't tell you why". :)
1 parent 8b5e5cd commit f1e390d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/depject/message/html/compose.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,9 @@ exports.create = function (api) {
278278
})
279279
})
280280

281-
if (contentWarningInput.value) {
282-
content.contentWarning = contentWarningInput.value
281+
const cw = contentWarningInput.value.trim()
282+
if (cw.length > 0) {
283+
content.contentWarning = cw
283284
}
284285

285286
try {

0 commit comments

Comments
 (0)