Explorar o código

Make agrument checking more robust

James Allen %!s(int64=8) %!d(string=hai) anos
pai
achega
e0e88b25fe

+ 2 - 2
services/web/app/coffee/Features/Subscription/FeaturesUpdater.coffee

@@ -11,8 +11,8 @@ V1SubscriptionManager = require("./V1SubscriptionManager")
 oneMonthInSeconds = 60 * 60 * 24 * 30
 oneMonthInSeconds = 60 * 60 * 24 * 30
 
 
 module.exports = FeaturesUpdater =
 module.exports = FeaturesUpdater =
-	refreshFeatures: (user_id, notifyV1, callback)->
-		if !callback?
+	refreshFeatures: (user_id, notifyV1 = true, callback = () ->)->
+		if typeof notifyV1 == 'function'
 			callback = notifyV1
 			callback = notifyV1
 			notifyV1 = true
 			notifyV1 = true