init_dict = false;
if (m_Operand1->GetReference(frame, init_dict, &vparent, &vindex, &psdhint)) {
- if (init_dict && VMOps::GetField(vparent, vindex, m_Operand1->GetDebugInfo()).IsEmpty())
- VMOps::SetField(vparent, vindex, new Dictionary(), m_Operand1->GetDebugInfo());
+ if (init_dict) {
+ Value old_value = VMOps::GetField(vparent, vindex, m_Operand1->GetDebugInfo());
+
+ if (old_value.IsEmpty() && !old_value.IsString())
+ VMOps::SetField(vparent, vindex, new Dictionary(), m_Operand1->GetDebugInfo());
+ }
*parent = VMOps::GetField(vparent, vindex, m_DebugInfo);
free_psd = true;