From 9950c38ec3aa844f35301a965482851f39141521 Mon Sep 17 00:00:00 2001
From: Romain Estievenart <res@odoo.com>
Date: Fri, 1 Mar 2019 07:16:52 +0000
Subject: [PATCH] [FIX] hr_skills: Remove non compliant ES5 syntax

Currently Odoo JavaScript code base support only ecmascript <= 5

So using a non compliant ES5 syntax can trigger a javascript engines
crash for some browsers like: IE, webview used by some old mobile
devices.

This commit fixes non compliant JS code syntax found to avoid potential
crash.
---
 addons/hr_skills/static/src/js/resume_widget.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/addons/hr_skills/static/src/js/resume_widget.js b/addons/hr_skills/static/src/js/resume_widget.js
index cf683146fed3..ef416abf2cb1 100644
--- a/addons/hr_skills/static/src/js/resume_widget.js
+++ b/addons/hr_skills/static/src/js/resume_widget.js
@@ -90,7 +90,7 @@ var AbstractGroupedOne2ManyRenderer = ListRenderer.extend({
         return qweb.render('hr_trash_button');
     },
 
-    _renderAddItemButton(group) {
+    _renderAddItemButton: function (group) {
         return qweb.render(this.addLineButtonTemplate, {
             context: JSON.stringify(this._getCreateLineContext(group)),
         });
@@ -141,8 +141,8 @@ var ResumeLineRenderer = AbstractGroupedOne2ManyRenderer.extend({
         var date_start = data.date_start && data.date_start.format(dateFormat) || "";
         var date_end = data.date_end && data.date_end.format(dateFormat) || _t("Current");
         return _.extend(data, {
-            date_start,
-            date_end,
+            date_start: date_start,
+            date_end: date_end,
         });
     },
 
-- 
GitLab