Skip to content

Nested Properties throw lodash errors. #559

@LazerFX

Description

@LazerFX

Attempting to @typedef or @namespace nested properties (i.e. prop.val) will throw an error with lodash. Attempted with the JSDoc Tags Property demonstration code:

/**
 * @namespace
 * @property {object}  defaults               - The default values for parties.
 * @property {number}  defaults.players       - The default number of players.
 * @property {string}  defaults.level         - The default level for the party.
 * @property {object}  defaults.treasure      - The default treasure.
 * @property {number}  defaults.treasure.gold - How much gold the party starts with.
 */
var config = {
    defaults: {
        players: 1,
        level:   'beginner',
        treasure: {
            gold: 0
        }
    }
};

This throws the error:

lodash.templateSources[1]:136
__e( name) +
     ^

ReferenceError: name is not defined
    at eval (lodash.templateSources[1]:136:6)
    at Array.forEach (native)
    at eval (lodash.templateSources[1]:134:22)
    at Array.forEach (native)
    at eval (lodash.templateSources[1]:113:21)
    at eval (lodash.templateSources[3]:84:11)
    at Array.forEach (native)
    at eval (lodash.templateSources[3]:80:7)
    at C:\Users\PStreet\AppData\Roaming\npm\node_modules\documentation\default_theme\index.js:86:30
    at ConcatStream.<anonymous> (C:\Users\PStreet\AppData\Roaming\npm\node_modules\documentation\node_modules\concat-stream\index.js:36:43)

I've not had chance to go into the code to find out why it's failing, but I suspect there's a requirement for nesting in there that's not being met. Hope this is enough to reproduce/recreate the issue!

Running on:

  • Windows 10 Pro (1607 - 14393.222 'Anniversary Update')
  • NPM 3.10.8
  • Node 6.7.0
  • documentation@4.0.0-beta10 (git://github.com/documentationjs/documentation.git#473a7a2dcecc67dc4addf68384561877eb871a3f)
  • jsdoc@3.4.2

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