Commit cf1ee673 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

check if rating is NaN

parent 9c8d5049
......@@ -180,6 +180,9 @@ function save_rating_init(){
url: "store_rating.php?model="+SETTINGS.path,
complete: function(response){
var value = parseInt(response.responseText);
if (isNaN(value)){
value = 5;
}
$("#model_rating").val(value);
// bind onchange
$("#model_rating").on('change',function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment