diff options
author | Richard Macklin <richard.github@nrm.com> | 2019-01-14 11:36:32 -0800 |
---|---|---|
committer | Richard Macklin <richard.github@nrm.com> | 2019-01-14 11:52:46 -0800 |
commit | 739f88e52ec9d673e23f41545d55626351ce24eb (patch) | |
tree | b6581633dcc9527fde5299846fd4f8d3518e3fd6 /activemodel/lib/active_model.rb | |
parent | 6320916513891938f7d2f0b5c9c36968ee2d8705 (diff) | |
download | rails-739f88e52ec9d673e23f41545d55626351ce24eb.tar.gz rails-739f88e52ec9d673e23f41545d55626351ce24eb.tar.bz2 rails-739f88e52ec9d673e23f41545d55626351ce24eb.zip |
Simplify `this.isActive() && this.webSocket` into `this.isActive()`
in Connection#close. We can do this because `isActive()` can only
return `true` if `this.webSocket` is truthy. (We can't have an active
connection without having instantiated a WebSocket. This is confirmed
in the code: Connection#isActive calls Connection#isState which calls
Connection#getState, which checks if `this.webSocket` is truthy and
returns `null` otherwise.)
Diffstat (limited to 'activemodel/lib/active_model.rb')
0 files changed, 0 insertions, 0 deletions