View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
12700Bug reportsTheme editorpublic2017-10-25 11:12
Reportertammo Assigned Tomarkusfluer 
PrioritynoneSeverityminor 
Status closedResolutionwon't fix 
Product Version3.0.0-beta.x 
Target Version3.0.xFixed in Version3.0.0-beta.x 
Summary12700: Javascript error: Use '===' to compare with ''.
Description

Copied minimal template to TFR minimal (using template editor). When viewing the javascript I see many warnings.

TagsNo tags attached.
Attached Files
javascript.png (62,754 bytes)   
javascript.png (62,754 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)3.0 beta GIT
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMySQL
Server OS (if known)W10
Webserver software & version (if known)Apache
PHP Version5.5.30

Users monitoring this issue

There are no users monitoring this issue.

Activities

markusfluer

markusfluer

2017-09-25 15:35

administrator   ~44462

Where exactly is the error?
Can you please define it a bit more.

tammo

tammo

2017-09-25 15:37

developer   ~44463

I am not sure it it is an error, but I saw many warnings (see image) and when I hover over the warnings, it gave me the text Use '===' to compare with ''.

markusfluer

markusfluer

2017-09-25 15:57

administrator   ~44464

Ahh, no that's expected behaviour.
We activated code hints for ace, so that you will get help to write better code by the eslint functionality in the ace editor.
It is actually better to test with "===" to be sure to only test against empty string and not against undefined, null, or false.
The triple equal sign is also testing against variable type.

In the case that is visible in the screenshot, you can safely ignore the warnings.

tammo

tammo

2017-09-25 16:18

developer   ~44465

OK, thank you!

DenisChenu

DenisChenu

2017-09-27 13:25

developer   ~44492

« you will get help to write better code by the eslint functionality» maybe WE need to apply it in included model (if needed) and here .text().trim(), we can use === without any issue :)

c_schmitz

c_schmitz

2017-10-25 11:12

administrator   ~44844

3.0.0-RC1 Build 171025 released

Issue History

Date Modified Username Field Change
2017-09-25 12:01 tammo New Issue
2017-09-25 12:01 tammo Status new => assigned
2017-09-25 12:01 tammo Assigned To => LouisGac
2017-09-25 12:01 tammo File Added: javascript.png
2017-09-25 12:52 LouisGac Assigned To LouisGac => markusfluer
2017-09-25 15:35 markusfluer Note Added: 44462
2017-09-25 15:37 tammo Note Added: 44463
2017-09-25 15:57 markusfluer Status assigned => resolved
2017-09-25 15:57 markusfluer Resolution open => won't fix
2017-09-25 15:57 markusfluer Note Added: 44464
2017-09-25 16:18 tammo Note Added: 44465
2017-09-27 13:25 DenisChenu Note Added: 44492
2017-10-12 09:19 c_schmitz Fixed in Version => 3.0.0-beta.x
2017-10-25 11:12 c_schmitz Note Added: 44844
2017-10-25 11:12 c_schmitz Status resolved => closed