Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Do not copy entire Strings Object; pass by reference instead  #4252

@redmunds

Description

@redmunds

There are a few places in the code that use $.extend() to copy the entire Strings Object like this:

        var templateVars = $.extend({
            title        : title,
            baseUrl      : baseUrl,
            errorMessage : errorMessage
        }, Strings);

Instead, it should be passed by reference:

        var templateVars = {
            title        : title,
            baseUrl      : baseUrl,
            errorMessage : errorMessage,
            Strings      : Strings
        };

Note that string references in dialog templates also need to be updated from SOME_STRING to Strings.SOME_STRING.

Some of the files that need to be updated:

  • help/HelpCommandHandlers.js
  • utils/UpdateNotification.js
  • extensions/default/RecentProjects/main.js
  • extensions/default/WebPlatformDocs/InlineDocsViewer.js

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions