novu icon indicating copy to clipboard operation
novu copied to clipboard

[NV-1367] (JS-0050) Avoid use of == and != issue#2287

Open ShashwatAgrawal20 opened this issue 2 years ago • 4 comments

What change does this PR introduce?

This PR solved the issue of [NV-1367] (JS-0050) Avoid use of == and != issue #2287

Why was this change needed?

As it is a good practice in the modern day to use the === & !== instead of the == & != it strengthens the security of the code base

Other information (Screenshots)

image

As these were some of the issues which have been solved

ShashwatAgrawal20 avatar Dec 15 '22 14:12 ShashwatAgrawal20

reverted those 2 files kindly check https://github.com/novuhq/novu/pull/2292/commits/3e4304b34a8ac98ea6b7424c7b9bbd09bcc2d9cb Might have solved the 1=='1' issue, can you check that again, please?

It might be helpful if you can tell me where I can run tests before submitting the code, Thanks

ShashwatAgrawal20 avatar Dec 15 '22 16:12 ShashwatAgrawal20

@djabarovgeorge removed the function from the code & checked there were no imports related to the function. https://github.com/novuhq/novu/pull/2292/commits/0ca668b7664d0047995d3bf6ba9f2959c13ac9f5

ShashwatAgrawal20 avatar Dec 16 '22 13:12 ShashwatAgrawal20

@ShashwatAgrawal20 sorry for the confusion but let's bring it back in the old format in case some other old API users still rely on that. We will deprecate this properly over the next couple of releases

scopsy avatar Dec 16 '22 15:12 scopsy

@scopsy should I close the PR?

ShashwatAgrawal20 avatar Dec 18 '22 15:12 ShashwatAgrawal20

@ShashwatAgrawal20 could you just revery the thing I mentioned so we can merge this? :)

scopsy avatar Dec 19 '22 06:12 scopsy

@scopsy did the changes where I was unsure & keep those strict checks where I thought this should not create any issue & also removed the function initializeSeenParam() which is not being used anymore.

ShashwatAgrawal20 avatar Dec 19 '22 10:12 ShashwatAgrawal20