Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: messageResponder.js

Issue 29322723: Issue 2805 - Only require filterValidation module where necessary (Closed)
Patch Set: Created July 20, 2015, 7:48 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: messageResponder.js
===================================================================
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -30,7 +30,6 @@
var Filter = filterClasses.Filter;
var BlockingFilter = filterClasses.BlockingFilter;
var Synchronizer = require("synchronizer").Synchronizer;
- var filterValidation = require("filterValidation");
var subscriptionClasses = require("subscriptionClasses");
var Subscription = subscriptionClasses.Subscription;
@@ -183,7 +182,7 @@
break;
case "filters.add":
var filter = Filter.fromText(message.text);
- var result = filterValidation.parseFilter(message.text);
+ var result = require("filterValidation").parseFilter(message.text);
if (result.error)
sendMessage("app", "error", [result.error.toString()], sender.page);
else if (result.filter)
@@ -205,7 +204,7 @@
callback(subscription.filters.map(convertFilter));
break;
case "filters.importRaw":
- var result = filterValidation.parseFilters(message.text);
+ var result = require("filterValidation").parseFilters(message.text);
var errors = [];
for (var i = 0; i < result.errors.length; i++)
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld