Use undefined instead of void

We originally wrote `undefined` in CoffeeScript.

CoffeeScript compiled it to `void 0` when generating the JavaScript
files. However, the reason to do so was the `undefined` variable was
mutable before ECMAScript 5. Using `undefined` is more intuitive, and
nowadays there's no reason to use `void 0`.
This commit is contained in:
Javi Martín
2019-07-03 01:16:29 +02:00
parent 5211f47842
commit 86c9f53c2d
4 changed files with 4 additions and 4 deletions

View File

@@ -18,7 +18,7 @@
$(".js-toggle-link").unbind("click").on("click", function() {
var toggle_txt;
$($(this).data("toggle-selector")).toggle("down");
if ($(this).data("toggle-text") !== void 0) {
if ($(this).data("toggle-text") !== undefined) {
toggle_txt = $(this).text();
$(this).text($(this).data("toggle-text"));
$(this).data("toggle-text", toggle_txt);