dist/utils/makeCall.js in prettier-2.0.0 vs dist/utils/makeCall.js in prettier-2.1.0
- old
+ new
@@ -1,13 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const makeCall = (path, opts, print) => {
- const operation = path.getValue().body[1];
+ const node = path.getValue();
+ const operator = node.op;
// Ignoring the next block for coverage information because it's only relevant
// in Ruby 2.5 and below.
/* istanbul ignore next */
- if ([".", "&."].includes(operation)) {
- return operation;
+ if ([".", "&."].includes(operator)) {
+ return operator;
}
- return operation === "::" ? "." : path.call(print, "body", 1);
+ return operator === "::" ? "." : path.call(print, "op");
};
exports.default = makeCall;