diff options
author | v1r0x <vinzenz.rosenkranz@gmail.com> | 2016-03-06 18:08:21 +0300 |
---|---|---|
committer | v1r0x <vinzenz.rosenkranz@gmail.com> | 2016-03-06 18:08:21 +0300 |
commit | 2ac7a48fc82a65947a2b1ad66b43fdcb11b4d786 (patch) | |
tree | 237b230efe2f3f3d9fbf105318fe64e8fa311f92 /js | |
parent | 37758085cdf6c57af3fbb1c672701d93f1874699 (diff) |
replace default params with undefined check
Diffstat (limited to 'js')
-rw-r--r-- | js/create_edit.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/create_edit.js b/js/create_edit.js index 952677e0..51f34bb3 100644 --- a/js/create_edit.js +++ b/js/create_edit.js @@ -329,7 +329,8 @@ function deselectItem(cell) { } } -function insertText(text, set=false) { +function insertText(text, set) { + if(typeof set === 'undefined') set = false; var table = document.getElementById('selected-texts-table'); var tr = table.insertRow(-1); var td = tr.insertCell(-1); @@ -341,7 +342,8 @@ function insertText(text, set=false) { td.id = 'text_' + text; } -function addRowToList(ts, text, timeTs=-1) { +function addRowToList(ts, text, timeTs) { + if(typeof timeTs === 'undefined') timeTs = -1; var table = document.getElementById('selected-dates-table'); var rows = table.rows; if(rows.length == 0) { @@ -394,7 +396,8 @@ function addRowToList(ts, text, timeTs=-1) { return; } -function addColToList(ts, text, dateTs=-1) { +function addColToList(ts, text, dateTs) { + if(typeof dateTs === 'undefined') dateTs = -1; var table = document.getElementById('selected-dates-table'); var rows = table.rows; if(rows.length == 0) { |