You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a function getValue in frontend/components/PhotoViewer.js that takes a dict, looks for a key, and returns a supplied default value if the key is missing.
Looks like the author was trying to get default values for a config dict going -- we can replace a dict of default args, or use the || operator to provide the same basic functionality.
e.g., instead of const className = getValue(config, "className", "");
do this: const className = config.className || "";
The text was updated successfully, but these errors were encountered:
There's a function
getValue
infrontend/components/PhotoViewer.js
that takes a dict, looks for a key, and returns a supplied default value if the key is missing.Looks like the author was trying to get default values for a config dict going -- we can replace a dict of default args, or use the
||
operator to provide the same basic functionality.e.g., instead of
const className = getValue(config, "className", "");
do this:
const className = config.className || "";
The text was updated successfully, but these errors were encountered: