Remove headers unconditionally

This commit is contained in:
man90 2021-05-14 08:44:21 +02:00
parent a4a78bcc7d
commit 79f05d65a9
2 changed files with 5 additions and 7 deletions

4
dist/js/app.js vendored
View File

@ -75,7 +75,7 @@ objectifyMarkdownNotWomen.heading = function(e, t) {
}, objectifyMarkdownNotWomen.tablecell = function(e, t) {
movies[movies.length - 1][headers[cellCounter]] = e, cellCounter++
}, objectifyMarkdownNotWomen.table = function(e, t) {
movies[0][headers[0]].toLowerCase() == headers[0] && movies.splice(0, 1), null == movies[movies.length - 1][headers[0]] && movies.pop(), moviesCollection.push({
movies.shift(), null == movies[movies.length - 1][headers[0]] && movies.pop(), moviesCollection.push({
heading: lastHeading,
movies: movies
}), movies = [{}]
@ -95,4 +95,4 @@ objectifyMarkdownNotWomen.heading = function(e, t) {
}), ReactDOM.render(React.createElement("div", null, e), document.getElementById("root"))
}
})
}, client.send();
}, client.send();

View File

@ -80,11 +80,9 @@ objectifyMarkdownNotWomen.tablecell = function(content, flags) {
};
objectifyMarkdownNotWomen.table = function(header, body) {
// Test if the first movie object is actually just the headers (which it will be)
if (movies[0][headers[0]].toLowerCase() == headers[0]) {
movies.splice(0, 1);
}
// Similarly, test if the very last movie object is empty and pop it
// Remove the headers
movies.shift();
// Test if the very last movie object is empty and pop it
if (movies[movies.length - 1][headers[0]] == null) {
movies.pop();
}