Skip to content

Commit

Permalink
fix code usage init
Browse files Browse the repository at this point in the history
  • Loading branch information
ethayer committed Mar 20, 2015
1 parent 9543bfe commit 102ae32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion user-lock-manager.smartapp.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,15 @@ def userHrefTitle(i) {
return title
}
def userHrefDescription(i) {
if (!state.codeUsage) {
state.codeUsage = [:]
}
if (!state.codeUsage["code${i}"]) {
state.codeUsage["code${i}"] = 0
}
def uc = settings."userCode${i}"
def us = settings."userSlot${i}"
def usage = state.codeUsage["code${i}"]
def usage = state?.codeUsage["code${i}"]
def description = ""
if (us != null) {
description += "Slot: ${us}"
Expand Down

0 comments on commit 102ae32

Please sign in to comment.