Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 84d0f48

Browse files
committed
Merge pull request #23 from pavelgj/remove-questionmarks
Replaced questionmark operator throughout as it's deprecated
2 parents d30723d + c11bdd7 commit 84d0f48

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

lib/block.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ class ComponentFactory {
336336

337337
attrAccessorFactory(dom.Element element, String name) {
338338
return ([String value]) {
339-
if (?value) {
339+
if (value != null) {
340340
if (value == null) {
341341
element.removeAttribute(name);
342342
} else {

lib/block_type.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class BlockTypeFactory {
77

88
BlockType call(templateElements, directivePositions, [group]) {
99
return new BlockType(blockFactory, templateElements, directivePositions,
10-
?group && group != null ? group : '');
10+
group != null ? group : '');
1111
}
1212
}
1313

@@ -26,7 +26,7 @@ class BlockType {
2626
}
2727

2828
Block call(Injector injector, [List<dom.Node> elements]) {
29-
if (!?elements || elements == null) {
29+
if (elements == null) {
3030
elements = cloneElements(templateElements);
3131
}
3232
return blockFactory(elements, directivePositions, group, injector);

lib/debug.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ MARK(name) {
2222

2323
dump([p1, p2, p3, p4, p5, p6, p7, p8, p9, p10]) {
2424
var log = [];
25-
if (?p1) log.add(STRINGIFY(p1));
26-
if (?p2) log.add(STRINGIFY(p2));
27-
if (?p3) log.add(STRINGIFY(p3));
28-
if (?p4) log.add(STRINGIFY(p4));
29-
if (?p5) log.add(STRINGIFY(p5));
30-
if (?p6) log.add(STRINGIFY(p6));
31-
if (?p7) log.add(STRINGIFY(p7));
32-
if (?p8) log.add(STRINGIFY(p8));
33-
if (?p9) log.add(STRINGIFY(p9));
34-
if (?p10) log.add(STRINGIFY(p10));
25+
if (p1 != null) log.add(STRINGIFY(p1));
26+
if (p2 != null) log.add(STRINGIFY(p2));
27+
if (p3 != null) log.add(STRINGIFY(p3));
28+
if (p4 != null) log.add(STRINGIFY(p4));
29+
if (p5 != null) log.add(STRINGIFY(p5));
30+
if (p6 != null) log.add(STRINGIFY(p6));
31+
if (p7 != null) log.add(STRINGIFY(p7));
32+
if (p8 != null) log.add(STRINGIFY(p8));
33+
if (p9 != null) log.add(STRINGIFY(p9));
34+
if (p10 != null) log.add(STRINGIFY(p10));
3535
js.scoped(() {
3636
js.context.console.log(log.join(', '));
3737
});

lib/scope.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class Scope implements Map {
354354
event = new Event(name, this);
355355

356356
//down while you can, then up and next sibling or up and next sibling until back at root
357-
if (!?listenerArgs) {
357+
if (listenerArgs == null) {
358358
listenerArgs = [];
359359
}
360360
listenerArgs.insert(0, event);

lib/selector.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Selector selectorFactory(List<String> selectors, [String startWith]) {
2828
selectors.forEach((selector) {
2929
var match;
3030

31-
if (?startWith) {
31+
if (startWith != null) {
3232
if (selector.substring(0, startWith.length) == startWith) {
3333
selector = selector.substring(startWith.length);
3434
} else {

0 commit comments

Comments
 (0)