aboutsummaryrefslogtreecommitdiffgithub
diff options
context:
space:
mode:
authorAustin Adams <git@austinjadams.com>2020-06-06 23:44:35 -0700
committerAustin Adams <git@austinjadams.com>2020-06-06 23:44:35 -0700
commite4da20e53021ef55e29c0519adafa6f4c6940d41 (patch)
tree27e90920ba16d36c095855bff76581f069166455
parent13a73a1a06588a8966627bd003ca8ea9dcfd5819 (diff)
downloadnovice-e4da20e53021ef55e29c0519adafa6f4c6940d41.tar.gz
novice-e4da20e53021ef55e29c0519adafa6f4c6940d41.tar.xz
Be a good boy and use key prop in components in arraysHEADmaster
-rw-r--r--packages/novice-web/novice-web/components/GuiDebugger.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/novice-web/novice-web/components/GuiDebugger.tsx b/packages/novice-web/novice-web/components/GuiDebugger.tsx
index f34f480..3a540bd 100644
--- a/packages/novice-web/novice-web/components/GuiDebugger.tsx
+++ b/packages/novice-web/novice-web/components/GuiDebugger.tsx
@@ -64,21 +64,24 @@ export class GuiDebugger extends React.Component<GuiDebuggerProps,
: this.state.state.pc;
const registers = this.isa.spec.regs.map(reg => {
+ let name = '';
let values;
if (reg.kind === 'reg-range') {
- values = range(reg.count).map(i => (<div className='reg'>{
+ name = 'range-' + reg.prefix;
+ values = range(reg.count).map(i => (<div className='reg' key={name + i}>{
reg.prefix + i + ': ' + fmtBinOrHex(this.state.state.regs.range[reg.prefix][i], reg.bits)
}</div>));
} else if (reg.kind === 'reg') {
- values = (<div className='reg'>
+ name = 'solo-' + reg.name;
+ values = (<div className='reg' key={name}>
{reg.name + ': ' + fmtBinOrHex(this.state.state.regs.solo[reg.name], reg.bits)}
</div>);
} else {
const _: never = reg;
}
- return (<div className='reg-family'>{values}</div>);
+ return (<div className='reg-family' key={'family-' + name}>{values}</div>);
});
const rowHeight = 20;