core: Don't panic if EvalWriteDiff gets a change in a non-root module

This commit is contained in:
Martin Atkins 2018-09-06 17:04:21 -07:00
parent a7f948ab90
commit 7f1954e70c
1 changed files with 1 additions and 1 deletions

View File

@ -836,7 +836,7 @@ func (n *EvalWriteDiff) Eval(ctx EvalContext) (interface{}, error) {
providerSchema := *n.ProviderSchema
change := *n.Change
if change.Addr.String() != n.Addr.String() || change.DeposedKey != n.DeposedKey {
if change.Addr.String() != addr.String() || change.DeposedKey != n.DeposedKey {
// Should never happen, and indicates a bug in the caller.
panic("inconsistent address and/or deposed key in EvalWriteDiff")
}