Ensure references to the room list store are broken for diffing

See commit diff for details.
This commit is contained in:
Travis Ralston 2020-07-24 10:38:04 -06:00
parent 0a31bd169c
commit 4d7980eb07
3 changed files with 38 additions and 2 deletions

View file

@ -14,6 +14,15 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* Clones an array as fast as possible, retaining references of the array's values.
* @param a The array to clone. Must be defined.
* @returns A copy of the array.
*/
export function arrayFastClone(a: any[]): any[] {
return a.slice(0, a.length);
}
/**
* Determines if the two arrays are different either in length, contents,
* or order of those contents.