mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
hotfix: fix panic multiply assign (#1257)
This commit is contained in:
parent
b669844ef7
commit
9b47a29864
@ -22,8 +22,8 @@ func assignUpdateOperator(d *dataTreeNavigator, context Context, expressionNode
|
||||
}
|
||||
|
||||
prefs := assignPreferences{}
|
||||
if expressionNode.Operation.Preferences != nil {
|
||||
prefs = expressionNode.Operation.Preferences.(assignPreferences)
|
||||
if p, ok := expressionNode.Operation.Preferences.(assignPreferences); ok {
|
||||
prefs = p
|
||||
}
|
||||
|
||||
if !expressionNode.Operation.UpdateAssign {
|
||||
|
@ -27,7 +27,6 @@ func createMultiplyOp(prefs interface{}) func(lhs *ExpressionNode, rhs *Expressi
|
||||
|
||||
func multiplyAssignOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
||||
var multiplyPrefs = expressionNode.Operation.Preferences
|
||||
expressionNode.Operation.Preferences = nil
|
||||
|
||||
return compoundAssignFunction(d, context, expressionNode, createMultiplyOp(multiplyPrefs))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user