Skip to content

Commit

Permalink
refactor(upgrade): avoid mutable exports. (angular#34232)
Browse files Browse the repository at this point in the history
Previously, create_angular_testing_module would export a mutable `let`
binding. The binding is already exporting using an accessor function
though, so the export on the let variable seems like an accidental
oversight.

This is functionally equivalent, but makes it easier for module
optimizers such as Closure Compiler to track down side effects and prune
modules.

PR Close angular#34232
  • Loading branch information
mprobst authored and josephperrott committed Dec 11, 2019
1 parent 621b47a commit 16fbafc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as angular from '../../../src/common/src/angular1';
import {$INJECTOR, INJECTOR_KEY, UPGRADE_APP_TYPE_KEY} from '../../../src/common/src/constants';
import {UpgradeAppType} from '../../../src/common/src/util';

export let $injector: angular.IInjectorService|null = null;
let $injector: angular.IInjectorService|null = null;
let injector: Injector;

export function $injectorFactory() {
Expand Down

0 comments on commit 16fbafc

Please sign in to comment.