mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-21 02:09:09 -05:00
fix incorrect Javascript private variable style
It's supposed to be a trailing underscore, not a leading underscore, as described here: https://google.github.io/styleguide/jsguide.html#naming-method-names https://google.github.io/styleguide/jsguide.html#naming-non-constant-field-names and discussed in an earlier PR: https://github.com/scottlamb/moonfire-nvr/pull/48#discussion_r175678736 I fixed these mechanically: rg -l0 'this[.]_' | xargs -0 perl -pi -e 's/this[.]_(\w+)/this.$1_/g' rg -l0 '\s_\w+\(' | xargs -0 perl -pi -e 's/_(\w+)\(/$1_(/g'
This commit is contained in:
@@ -60,7 +60,7 @@ export default class StreamView {
|
||||
trimmed,
|
||||
recordingsParent
|
||||
);
|
||||
this._enabled = true;
|
||||
this.enabled_ = true;
|
||||
this.recordingsUrl = null;
|
||||
this.recordingsReq = null;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ export default class StreamView {
|
||||
* @return {Boolean}
|
||||
*/
|
||||
get enabled() {
|
||||
return this._enabled;
|
||||
return this.enabled_;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +80,7 @@ export default class StreamView {
|
||||
* @param {Boolean} enabled Whether view should be enabled
|
||||
*/
|
||||
set enabled(enabled) {
|
||||
this._enabled = enabled;
|
||||
this.enabled_ = enabled;
|
||||
this.recordingsView.show = enabled;
|
||||
console.log('Stream %s-%s %s', this.camera.shortName, this.streamType,
|
||||
this.enabled ? 'enabled' : 'disabled');
|
||||
|
||||
Reference in New Issue
Block a user