kimroen / ember-cli-document-title

Adding document title behaviour to your ember app
MIT License
215 stars 61 forks source link

Wrapping document-title contents in an IIFE #79

Closed scalvert closed 6 years ago

scalvert commented 6 years ago

The document-title.js file in vendor is not a module, nor is it wrapped in an IIFE to ensure it doesn't pollute the global scope. Currently, the line

var Promise = Ember.RSVP.Promise;

overwrites self.Promise in global scope, changing promises used in tests via QUnit/ember-qunit in addition to any other libraries that rely on native promises.

This PR wraps this file in an IIFE to ensure we don't overwrite the global native promise implementation.

scalvert commented 6 years ago

We should try to land this after #80.

scalvert commented 6 years ago

Closing this as it's a dupe of #74