Fixes bug where position was never set

The mallet operator was compiling to `if (!position) position =
name.position`. Since position is set earlier the conditional was always
true and position was never updated from the plugin object.
This commit is contained in:
jquense 2015-04-20 12:34:39 -04:00
parent b6498103db
commit ef56042c93

View File

@ -243,7 +243,7 @@ export default class File {
if (name) {
if (typeof name === "object" && name.transformer) {
plugin = name.transformer;
position ||= name.position;
position = name.position || position;
} else if (typeof name === "string") {
// this is a plugin in the form of "foobar" or "foobar:after"
// where the optional colon is the delimiter for plugin position in the transformer stack