Permalink
Browse files

Fix getPostData function

dataPost can be undefined

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
  • Loading branch information...
mauriciofauth committed Jan 8, 2018
1 parent 1fc566f commit 367f49b12bb15f7891abeac22c7f5be538e39af1
Showing with 1 addition and 2 deletions.
  1. +1 −2 js/functions.js
View
@@ -5093,9 +5093,8 @@ function configGet(key, cached=true)
jQuery.fn.getPostData = function() {
var dataPost = this.attr('data-post');
// Strip possible leading ?
if (dataPost.startsWith('?')) {
if (dataPost !== undefined && dataPost.startsWith('?')) {
dataPost = dataPost.substr(1);
}
return dataPost;
};

0 comments on commit 367f49b

Please sign in to comment.