From cc701d2f7c56f8cf4de4912990949061d81b6987 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 4 May 2018 14:45:32 -0400 Subject: [PATCH] better fix --- .../lib/discourse-markdown/discourse-local-dates.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6 index 875186b4888..ef46c5ca225 100644 --- a/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6 +++ b/plugins/discourse-local-dates/assets/javascripts/lib/discourse-markdown/discourse-local-dates.js.es6 @@ -23,10 +23,12 @@ function addLocalDate(buffer, matches, state) { ['class', 'discourse-local-date'], ['data-date', config.date], ['data-time', config.time], - ['data-recurring', config.recurring], ['data-format', config.format], ['data-timezones', config.timezones], ]; + if (config.recurring) { + token.attrs.push(['data-recurring', config.recurring]); + } buffer.push(token); const previews = config.timezones.split("|").filter(t => t).map(timezone => {