]> cat aescling's git repositories - mastodon.git/commit
Do not use function name to track components (#6542)
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Sat, 24 Feb 2018 18:10:57 +0000 (03:10 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 24 Feb 2018 18:10:57 +0000 (19:10 +0100)
commit7cb49eaa3aad03b60a1e1620d2f700d6ed2b3ea0
tree21101f9ce659163fac0fa07c0b1ea5c847e7a075
parent4d8c0d995981d580fa774950fa93c17b0004246e
Do not use function name to track components (#6542)

UglifyJS2 is allowed to mangle function names, and function names can also
be duplicate if they are from different scopes. Therefore function names
are not reliable as identifiers.

Functions as keys for Map object is a cheaper and more reliable
alternative.
app/javascript/mastodon/features/ui/components/bundle.js