Skip to content

Commit b43daf7

Browse files
committed
fix: debug message
1 parent 9006e5b commit b43daf7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/subroutines/readSubroutine.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,19 @@ import type {
1313
const debug = createDebug('subroutine:read');
1414

1515
const readSubroutine: SubroutineType = (subject, [target, name], {evaluator}) => {
16-
debug('reading property "%s"', name);
17-
1816
if (!evaluator.isElement(subject)) {
1917
throw new SurgeonError('Unexpected value. Value must be an element.');
2018
}
2119

2220
let value;
2321

2422
if (target === 'attribute') {
23+
debug('reading attribute "%s"', name);
24+
2525
value = evaluator.getAttributeValue(subject, name);
2626
} else if (target === 'property') {
27+
debug('reading property "%s"', name);
28+
2729
value = evaluator.getPropertyValue(subject, name);
2830
} else {
2931
throw new SurgeonError('Unexpected read target.');

0 commit comments

Comments
 (0)