Kaynağa Gözat

Treat config.json ajax output as JSON instead of string

inderpreet99 11 yıl önce
ebeveyn
işleme
25fbae3c1b
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      js/app.js

+ 2 - 2
js/app.js

@@ -1,6 +1,6 @@
   jQuery( document ).ready(function( $ ) {
 
-    $.ajax( { url: 'config.json' } ).done(  function( config ) {
+    $.ajax( { url: 'config.json', dataType: 'json' } ).done(  function( config ) {
 
     var c = config;
 
@@ -470,4 +470,4 @@
           };
    
 
- });
+ });