Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Properly handle missing language definitions

  • Loading branch information...
commit 2a687d557adaade9171de42dfd5d2531f4e78ee1 1 parent 08a8fbe
Jason Smith authored February 21, 2011

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  audit_couchdb.js
5  audit_couchdb.js
@@ -48,6 +48,11 @@ function CouchAudit(url) {
48 48
     var ddoc_url = lib.join(db_url, ddoc._id);
49 49
     ddocs_in_db[db_url].push(ddoc);
50 50
 
  51
+    if(typeof ddoc.language === 'undefined') {
  52
+      self.low('No language defined (assuming "javascript"): ' + ddoc_url);
  53
+      ddoc.language = 'javascript';
  54
+    }
  55
+
51 56
     if(ddoc.language !== info.view_index.language)
52 57
       throw new Error("Different languages in ddoc vs. index info: " + JSON.stringify(info) + " vs. language = " + JSON.stringify(ddoc.language));
53 58
 

0 notes on commit 2a687d5

Please sign in to comment.
Something went wrong with that request. Please try again.