Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

TypeError: Cannot call method 'sort' of undefined #59

@exos

Description

@exos

Hi! I'm using vim + tagbar plugin and this use jsctags for generate a tags explorer.

For configure it I folllow this:
https://github.com/majutsushi/tagbar/wiki#javascript

But, when I try to open the panel, vim reports this error:

Executed command: "'/usr/bin/jsctags'  -f -  '/tmp/v2XOofL/28.js'"
Command output:
Array.prototype.push called on null or undefined
/usr/lib/node_modules/jsctags/jsctags/ctags/writer.js:89
        this.tags = this.tags.sort(sortfunc);
                              ^
TypeError: Cannot call method 'sort' of undefined
    at Object.exports.TagWriter.Trait.write (/usr/lib/node_modules/jsctags/jsctags/ctags/writer.js:89:31)
    at Object.<anonymous> (/usr/lib/node_modules/jsctags/bin/jsctags.js:269:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

I trayed to run this manually:

jsctags -f - gui.js

And the error is the same.

More info:

$ node -v 
v0.10.26
$ npm info jsctags | grep version
npm http GET https://registry.npmjs.org/jsctags
npm http 304 https://registry.npmjs.org/jsctags
  versions: '0.1.0',
  version: '0.1.0',

File with I tryed working: http://paste.kde.org/pfnchcp0f

Sorry my poor english :)

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