small change to prevent unnecessary function calls.
small change to prevent unnecessary function calls.

Change-Id: Iea588eee17c1e499d8e2a97ddb66d0f7fdae54d6

WeaveTeam/WeaveJS,WeaveTeam/WeaveJS,WeaveTeam/WeaveJS,WeaveTeam/WeaveJS