hotfix: fix panic multiply assign (#1257)

This commit is contained in:
Hayama 2022-06-25 11:08:52 +09:00 committed by GitHub
parent b669844ef7
commit 9b47a29864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -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 {

View File

@ -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))
}