Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7892

JS (v8) doesn't indent

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 Critical - P2
    • 2.4.4, 2.5.0
    • 2.3.1
    • JavaScript, Shell
    • None
    • Fully Compatible
    • ALL

    Description

      If you do

      > db.runCommand
      function ( obj ){
      if ( typeof( obj ) == "string" ){
      var n = {};
      n[obj] = 1;
      obj = n;
      }
      return this.getCollection( "$cmd" ).findOne( obj );
      }

      The output is not indented.

      This worked with spidermonkey

      Attachments

        Activity

          People

            tad Tad Marshall
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: