Skip to content

Commit

Permalink
Merge pull request #11431 from wojtekmaj/secondary-toolbar-const
Browse files Browse the repository at this point in the history
Use const in secondary_toolbar.js
  • Loading branch information
timvandermeij authored Dec 23, 2019
2 parents bcf8ae3 + 5ea9127 commit a6188a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/secondary_toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error, prefer-const: error */

import { SCROLLBAR_PADDING, ScrollMode, SpreadMode } from './ui_utils';
import { CursorTool } from './pdf_cursor_tools';
Expand Down Expand Up @@ -172,8 +173,8 @@ class SecondaryToolbar {
for (const { element, eventName, close, eventDetails, } of this.buttons) {
element.addEventListener('click', (evt) => {
if (eventName !== null) {
let details = { source: this, };
for (let property in eventDetails) {
const details = { source: this, };
for (const property in eventDetails) {
details[property] = eventDetails[property];
}
this.eventBus.dispatch(eventName, details);
Expand Down

0 comments on commit a6188a5

Please sign in to comment.