Fixed JS bug with duplicating a tab field

Signed-off-by: Elliot Condon <e@elliotcondon.com>