use jquery isEmptyObject
This commit is contained in:
parent
3c36a2730f
commit
7829f6828b
|
@ -41,9 +41,11 @@ html, body {
|
|||
|
||||
.tabButton {
|
||||
cursor: pointer;
|
||||
width: 150px;
|
||||
width: 50px;
|
||||
border: 1px solid #000;
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.selectedListItem .listItemText {
|
||||
|
|
|
@ -94,7 +94,7 @@ function getStopsList(stops) {
|
|||
var props = v.properties;
|
||||
var geom = v.geometry;
|
||||
var $li = $('<li />').addClass("stopItem").data("slug", props.slug).data("properties", props).data("geometry", geom).text(props.display_name).appendTo($ul);
|
||||
isEmpty(geom) ? $li.addClass("no_has_point") : $li.addClass("has_point");
|
||||
$.isEmptyObject(geom) ? $li.addClass("no_has_point") : $li.addClass("has_point");
|
||||
});
|
||||
return $ul;
|
||||
}
|
||||
|
@ -108,6 +108,3 @@ function getStopForm(stop) {
|
|||
return $div;
|
||||
}
|
||||
|
||||
function isEmpty(obj) {
|
||||
return (JSON.stringify(obj) == "{}")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user