aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Compiler.js4
-rw-r--r--src/Scope.js4
-rw-r--r--src/directives.js2
-rw-r--r--src/filters.js2
-rw-r--r--src/parser.js14
-rw-r--r--src/service/route.js2
-rw-r--r--src/service/xhr.cache.js4
-rw-r--r--src/widgets.js4
8 files changed, 18 insertions, 18 deletions
diff --git a/src/Compiler.js b/src/Compiler.js
index 98e9630c..0001f8af 100644
--- a/src/Compiler.js
+++ b/src/Compiler.js
@@ -229,14 +229,14 @@ Compiler.prototype = {
template = new Template();
eachAttribute(element, function(value, name){
if (!widget) {
- if (widget = self.widgets('@' + name)) {
+ if ((widget = self.widgets('@' + name))) {
element.addClass('ng-attr-widget');
widget = bind(selfApi, widget, value, element);
}
}
});
if (!widget) {
- if (widget = self.widgets(elementName)) {
+ if ((widget = self.widgets(elementName))) {
if (elementNamespace)
element.addClass('ng-widget');
widget = bind(selfApi, widget, element);
diff --git a/src/Scope.js b/src/Scope.js
index b50d6273..6e90ea66 100644
--- a/src/Scope.js
+++ b/src/Scope.js
@@ -343,7 +343,7 @@ Scope.prototype = {
scope.$service('$exceptionHandler')(e);
}
}
- if (watchers = scope.$$watchers) {
+ if ((watchers = scope.$$watchers)) {
// process our watches
length = watchers.length;
while (length--) {
@@ -372,7 +372,7 @@ Scope.prototype = {
}
} while (scope !== this);
}
- } while (scope = next);
+ } while ((scope = next));
if(!(ttl--)) {
throw Error('100 $digest() iterations reached. Aborting!');
diff --git a/src/directives.js b/src/directives.js
index 937d0cca..54d7feb2 100644
--- a/src/directives.js
+++ b/src/directives.js
@@ -230,7 +230,7 @@ angularDirective("ng:bind", function(expression, element){
// If we are HTML than save the raw HTML data so that we don't
// recompute sanitization since it is expensive.
// TODO: turn this into a more generic way to compute this
- if (isHtml = (value instanceof HTML))
+ if ((isHtml = (value instanceof HTML)))
value = (html = value).html;
if (lastValue === value && lastError == error) return;
isDomElement = isElement(value);
diff --git a/src/filters.js b/src/filters.js
index f636b242..67e30046 100644
--- a/src/filters.js
+++ b/src/filters.js
@@ -610,7 +610,7 @@ angularFilter.linky = function(text) {
var writer = htmlSanitizeWriter(html);
var url;
var i;
- while (match = raw.match(LINKY_URL_REGEXP)) {
+ while ((match = raw.match(LINKY_URL_REGEXP))) {
// We can not end in these as they are sometimes found at the end of the sentence
url = match[0];
// if we did not match ftp/http/mailto then assume mailto
diff --git a/src/parser.js b/src/parser.js
index dadab1fb..5129f2f7 100644
--- a/src/parser.js
+++ b/src/parser.js
@@ -421,7 +421,7 @@ function parser(text, json){
var left = logicalOR();
var right;
var token;
- if (token = expect('=')) {
+ if ((token = expect('='))) {
if (!left.assign) {
throwError("implies assignment but [" +
text.substring(0, token.index) + "] can not be assigned to", token);
@@ -468,7 +468,7 @@ function parser(text, json){
function relational(){
var left = additive();
var token;
- if (token = expect('<', '>', '<=', '>=')) {
+ if ((token = expect('<', '>', '<=', '>='))) {
left = binaryFn(left, token.fn, relational());
}
return left;
@@ -477,7 +477,7 @@ function parser(text, json){
function additive(){
var left = multiplicative();
var token;
- while(token = expect('+','-')) {
+ while ((token = expect('+','-'))) {
left = binaryFn(left, token.fn, multiplicative());
}
return left;
@@ -486,7 +486,7 @@ function parser(text, json){
function multiplicative(){
var left = unary();
var token;
- while(token = expect('*','/','%')) {
+ while ((token = expect('*','/','%'))) {
left = binaryFn(left, token.fn, unary());
}
return left;
@@ -496,9 +496,9 @@ function parser(text, json){
var token;
if (expect('+')) {
return primary();
- } else if (token = expect('-')) {
+ } else if ((token = expect('-'))) {
return binaryFn(ZERO, token.fn, unary());
- } else if (token = expect('!')) {
+ } else if ((token = expect('!'))) {
return unaryFn(token.fn, unary());
} else {
return primary();
@@ -539,7 +539,7 @@ function parser(text, json){
}
}
var next;
- while (next = expect('(', '[', '.')) {
+ while ((next = expect('(', '[', '.'))) {
if (next.text === '(') {
primary = functionCall(primary);
} else if (next.text === '[') {
diff --git a/src/service/route.js b/src/service/route.js
index 9b4db0dd..5741c940 100644
--- a/src/service/route.js
+++ b/src/service/route.js
@@ -216,7 +216,7 @@ angularServiceInject('$route', function($location) {
// Match a route
forEach(routes, function(rParams, rPath) {
if (!pathParams) {
- if (pathParams = matcher($location.hashPath, rPath)) {
+ if ((pathParams = matcher($location.hashPath, rPath))) {
selectedRoute = rParams;
}
}
diff --git a/src/service/xhr.cache.js b/src/service/xhr.cache.js
index 256b936e..14051c40 100644
--- a/src/service/xhr.cache.js
+++ b/src/service/xhr.cache.js
@@ -52,7 +52,7 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
if (method == 'GET') {
var data, dataCached;
- if (dataCached = cache.data[url]) {
+ if ((dataCached = cache.data[url])) {
if (sync) {
success(200, copy(dataCached.value));
@@ -64,7 +64,7 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
return;
}
- if (data = inflight[url]) {
+ if ((data = inflight[url])) {
data.successes.push(success);
data.errors.push(error);
} else {
diff --git a/src/widgets.js b/src/widgets.js
index d9af21c9..30f7256a 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -877,7 +877,7 @@ angularWidget('select', function(element){
lastElement = null; // start at the begining
for(index = 0, length = optionGroup.length; index < length; index++) {
option = optionGroup[index];
- if (existingOption = existingOptions[index+1]) {
+ if ((existingOption = existingOptions[index+1])) {
// reuse elements
lastElement = existingOption.element;
if (existingOption.label !== option.label) {
@@ -1116,7 +1116,7 @@ angularWidget('ng:switch', function (element) {
this.$watch(watchExpr, function(scope, value) {
element.html('');
- if (selectedTemplate = casesTemplate[value] || defaultCaseTemplate) {
+ if ((selectedTemplate = casesTemplate[value] || defaultCaseTemplate)) {
changeCounter++;
if (childScope) childScope.$destroy();
childScope = scope.$new();