Altered type in utils

This commit is contained in:
Fergal Moran
2013-07-01 10:43:56 +01:00
parent 2adf3da5c2
commit 7da8c92db9
2 changed files with 2 additions and 2 deletions

View File

@@ -17,7 +17,7 @@ define ['jquery', 'bootstrap', 'toastr'], ($, bootstrap, toastr) ->
if document.cookie.indexOf("sessionId") if document.cookie.indexOf("sessionId")
$.getJSON "/ajax/session_play_count", (data) => $.getJSON "/ajax/session_play_count", (data) =>
console.log "utils: got playcount" console.log "utils: got playcount"
if data.play_count != 0 and ((data.play_count % com.podnoms.settings.nag_count) == 0) if data.play_count isnt "0" and ((data.play_count % com.podnoms.settings.nag_count) == 0)
@modal "/dlg/PlayCountLoginAlert" @modal "/dlg/PlayCountLoginAlert"
true true

View File

@@ -28,7 +28,7 @@
if (document.cookie.indexOf("sessionId")) { if (document.cookie.indexOf("sessionId")) {
$.getJSON("/ajax/session_play_count", function(data) { $.getJSON("/ajax/session_play_count", function(data) {
console.log("utils: got playcount"); console.log("utils: got playcount");
if (data.play_count !== 0 && ((data.play_count % com.podnoms.settings.nag_count) === 0)) { if (data.play_count !== "0" && ((data.play_count % com.podnoms.settings.nag_count) === 0)) {
return _this.modal("/dlg/PlayCountLoginAlert"); return _this.modal("/dlg/PlayCountLoginAlert");
} }
}); });