From 367f49b12bb15f7891abeac22c7f5be538e39af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Mon, 8 Jan 2018 17:12:44 -0200 Subject: [PATCH] Fix getPostData function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dataPost can be undefined Signed-off-by: MaurĂ­cio Meneghini Fauth --- js/functions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index b449070b5b6e..35bc54b038b1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -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; }; -