* luci/themes: do an explicit check for table data type on result of uci.changes()
[oweals/luci.git] / themes / openwrt.org / luasrc / view / themes / openwrt.org / header.htm
index 3ecc8d73ca1e0ba17276ff142f1fe469a644182c..f18d0bce3944fae5649ccf22f3f98c0721ba7133 100644 (file)
@@ -122,9 +122,11 @@ end
                                require("luci.model.uci") 
                                local ucic = 0
                                 local changes = luci.model.uci.changes()
-                                for n, s in pairs(changes) do
-                                       for no, o in pairs(s) do
-                                               ucic = ucic + 1;
+                               if type(changes) == "table" then        -- XXX: sometimes string or nil / needs investigation
+                                       for n, s in pairs(changes) do
+                                               for no, o in pairs(s) do
+                                                       ucic = ucic + 1;
+                                               end
                                        end
                                end
                %>