1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-07 05:22:15 +03:00

eslint ---fix for prefer-const

This commit is contained in:
David Baker
2017-01-19 17:42:10 +00:00
parent 9b354ba99e
commit 7bca05af64
60 changed files with 1732 additions and 1732 deletions

View File

@@ -21,9 +21,9 @@ limitations under the License.
* @module models/event
*/
let EventEmitter = require("events").EventEmitter;
const EventEmitter = require("events").EventEmitter;
let utils = require('../utils.js');
const utils = require('../utils.js');
/**
* Enum for event statuses.
@@ -350,8 +350,8 @@ utils.extend(module.exports.MatrixEvent.prototype, {
}
}
let keeps = _REDACT_KEEP_CONTENT_MAP[this.getType()] || {};
let content = this.getContent();
const keeps = _REDACT_KEEP_CONTENT_MAP[this.getType()] || {};
const content = this.getContent();
for (key in content) {
if (!content.hasOwnProperty(key)) {
continue;
@@ -424,7 +424,7 @@ utils.extend(module.exports.MatrixEvent.prototype, {
* m.room.aliases allows key aliases
*/
// a map giving the keys we keep when an event is redacted
let _REDACT_KEEP_KEY_MAP = [
const _REDACT_KEEP_KEY_MAP = [
'event_id', 'type', 'room_id', 'user_id', 'state_key', 'prev_state',
'content', 'unsigned',
].reduce(function(ret, val) {
@@ -432,7 +432,7 @@ let _REDACT_KEEP_KEY_MAP = [
}, {});
// a map from event type to the .content keys we keep when an event is redacted
let _REDACT_KEEP_CONTENT_MAP = {
const _REDACT_KEEP_CONTENT_MAP = {
'm.room.member': {'membership': 1},
'm.room.create': {'creator': 1},
'm.room.join_rules': {'join_rule': 1},