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

Replaced questionmark operator throughout #23

Merged
merged 1 commit into from
Jun 28, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/block.dart
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class ComponentFactory {

attrAccessorFactory(dom.Element element, String name) {
return ([String value]) {
if (?value) {
if (value != null) {
if (value == null) {
element.removeAttribute(name);
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/block_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class BlockTypeFactory {

BlockType call(templateElements, directivePositions, [group]) {
return new BlockType(blockFactory, templateElements, directivePositions,
?group && group != null ? group : '');
group != null ? group : '');
}
}

Expand All @@ -26,7 +26,7 @@ class BlockType {
}

Block call(Injector injector, [List<dom.Node> elements]) {
if (!?elements || elements == null) {
if (elements == null) {
elements = cloneElements(templateElements);
}
return blockFactory(elements, directivePositions, group, injector);
Expand Down
20 changes: 10 additions & 10 deletions lib/debug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ MARK(name) {

dump([p1, p2, p3, p4, p5, p6, p7, p8, p9, p10]) {
var log = [];
if (?p1) log.add(STRINGIFY(p1));
if (?p2) log.add(STRINGIFY(p2));
if (?p3) log.add(STRINGIFY(p3));
if (?p4) log.add(STRINGIFY(p4));
if (?p5) log.add(STRINGIFY(p5));
if (?p6) log.add(STRINGIFY(p6));
if (?p7) log.add(STRINGIFY(p7));
if (?p8) log.add(STRINGIFY(p8));
if (?p9) log.add(STRINGIFY(p9));
if (?p10) log.add(STRINGIFY(p10));
if (p1 != null) log.add(STRINGIFY(p1));
if (p2 != null) log.add(STRINGIFY(p2));
if (p3 != null) log.add(STRINGIFY(p3));
if (p4 != null) log.add(STRINGIFY(p4));
if (p5 != null) log.add(STRINGIFY(p5));
if (p6 != null) log.add(STRINGIFY(p6));
if (p7 != null) log.add(STRINGIFY(p7));
if (p8 != null) log.add(STRINGIFY(p8));
if (p9 != null) log.add(STRINGIFY(p9));
if (p10 != null) log.add(STRINGIFY(p10));
js.scoped(() {
js.context.console.log(log.join(', '));
});
Expand Down
2 changes: 1 addition & 1 deletion lib/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class Scope implements Map {
event = new Event(name, this);

//down while you can, then up and next sibling or up and next sibling until back at root
if (!?listenerArgs) {
if (listenerArgs == null) {
listenerArgs = [];
}
listenerArgs.insert(0, event);
Expand Down
2 changes: 1 addition & 1 deletion lib/selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Selector selectorFactory(List<String> selectors, [String startWith]) {
selectors.forEach((selector) {
var match;

if (?startWith) {
if (startWith != null) {
if (selector.substring(0, startWith.length) == startWith) {
selector = selector.substring(startWith.length);
} else {
Expand Down