8000 Make the time range switched not case sensitive. · leetcode/flot-plugin-collection@6595ac1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6595ac1

Browse files
committed
Make the time range switched not case sensitive.
1 parent 051ceab commit 6595ac1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/flot/jquery.flot.snap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Da
146146

147147
var _snap = function(range, axis, startDate) {
148148
var end, hour, month, year;
149-
switch (range) {
149+
switch (range.toLowerCase()) {
150150
case "hour":
151151
// go to the start of the hour
152152
hour = startDate.getHours();
@@ -205,7 +205,7 @@ return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Da
205205
if (direction == "left") dir = -1;
206206
else dir = 1;
207207

208-
switch (range) {
208+
switch (range.toLowerCase()) {
209209
case "hour":
210210
hour = startDate.getHours();
211211
startDate.clearTime().addHours(hour + dir);

0 commit comments

Comments
 (0)
0