Giter Club home page Giter Club logo

Comments (1)

brianfreud avatar brianfreud commented on June 17, 2024

I had the same error popping up. It seems to be coming from
var diff = sort_info.compare_fn(e1.columns[th_index], e2.columns[th_index]);
when either e1[index] or e2[index] doesn't exist.

In my particular case, it stemmed from a table that had a 'short' row. Ie:

H1 H2 H3
A1 B1 C1
A2 B2
A3 B3 C3
A4 B4 C4

Note the missing cell C2. Sorting on H3, it'd try to read the string from the nonexistant C2, making the sort function fail due to an undefined string as argument e1[index].

Normally, this likely indicates an issue with the table, not the sort. However, the sort should be able to handle this; I'd suggest that var diff needs to first check that both e1[index] and e2[index] actually exist before trying to sort them.

from stupid-table-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.