Skip to content

empty @inner tag (in wrong place?) crashes very ugly #652

@batje

Description

@batje

I developed an AMD module that uses an internal function. I thought it would be nice to tag the documentation of that function with the @inner tag (though it might not be entirely valid). That crashes documentationjs without clean error. Adding some text on the same line after @inner removes the crash.

Code sample:

define([], function() {
  DoSomething();

  /**
   * My Object of Documentation Desire
   * @exports myObject
   */
  var myObject = {};

  return myObject;

  /**
   * DoSomething - Might do something
   *
   * @return {boolean}  Did we really do anything?
   * @inner
   */
  function DoSomething() {
    return false;
  }
});

Error Message:

documentation build src/documentationbug.js -f html -o docs2/ 
/usr/local/lib/node_modules/documentation/lib/commands/build.js:66
      throw err;
      ^

TypeError: Cannot convert undefined or null to object
    at hasOwnProperty (native)
    at /usr/local/lib/node_modules/documentation/lib/hierarchy.js:68:27
    at Array.forEach (native)
    at module.exports (/usr/local/lib/node_modules/documentation/lib/hierarchy.js:38:12)
    at buildSync (/usr/local/lib/node_modules/documentation/index.js:221:5)
    at /usr/local/lib/node_modules/documentation/index.js:147:16
    at /usr/local/lib/node_modules/documentation/lib/input/dependency.js:63:5
    at ConcatStream.<anonymous> (/usr/local/lib/node_modules/documentation/node_modules/concat-stream/index.js:36:43)
    at emitNone (events.js:72:20)
    at ConcatStream.emit (events.js:166:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy