The js Map
keys must match exactly: if keys are numbers (and they are in your case), then you retrieve them using numeric values.(js Map
键必须完全匹配:如果键是数字(在您的情况下是键),则可以使用数字值检索它们。)
props.postersMap.get(Number(posterId))
would do.(props.postersMap.get(Number(posterId))
可以。)
Or guarantee you're providing a valid numeric any other available way.(或保证您以任何其他可用的方式提供有效的数字。) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…