From 8c0d8a955df56f2dba9cd1224c0acfe391802846 Mon Sep 17 00:00:00 2001 From: Bohung Date: Fri, 25 Feb 2022 10:56:10 +0800 Subject: [PATCH] Fix js bug. --- app/assets/javascripts/cancer_predict.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/cancer_predict.js b/app/assets/javascripts/cancer_predict.js index e6eab8f..7afd3a7 100644 --- a/app/assets/javascripts/cancer_predict.js +++ b/app/assets/javascripts/cancer_predict.js @@ -55,11 +55,11 @@ $(document).ready(function(){ return Math.round(Number(num)*(10**Digit))/(10**Digit); }; head_data.done(function(){ - if(head_images.responseJSON['head_images'] != ''){ - $('.header-nav').html(head_images.responseJSON['head_images']); + if(head_data.responseJSON['head_images'] != ''){ + $('.header-nav').html(head_data.responseJSON['head_images']); } - if(head_images.responseJSON['title'] != ''){ - $('.navbar-brand').html(head_images.responseJSON['title']); + if(head_data.responseJSON['title'] != ''){ + $('.navbar-brand').html(head_data.responseJSON['title']); } data['danger_texts'] = head_data.responseJSON['danger_texts']; $('head title').text(head_data.responseJSON['page_title'])