Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
gulp-uglify causes constructor.name misbehaviour

In my gulpfile.js if I comment this line

.pipe(uglify({ preserveComments: 'some'}))

then my code is not looking ugly and for following line of code everything is working fine.

if(Mystudy.constructor.name != "MyStudyView")

but if I uglify my code using gulp-uglify(without commenting that uglify code on top) then the above line looks something like this

if ("MyStudyView" != e.constructor.name)

and value of e.constructor.name is also getting ugly like "e" instead of the "MyStudyView".

I want to run my code the same way as it was working without uglifying and I don't want to compromise on the uglify as well, is there any way that I can achieve what I want?

Extra information: That "if" condition code is written in the filename of mystudy.js and under the function closeIt

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!