Comparison

core/moduleapi.lua @ 9509:b57353f76c83

core.moduleapi: Remove redundant condition
author Kim Alvefur <zash@zash.se>
date Thu, 18 Oct 2018 00:49:29 +0200
parent 9149:d03f21729b2c
child 9556:e4c09e335bd9
comparison
equal deleted inserted replaced
9508:2055b497b515 9509:b57353f76c83
285 return value; 285 return value;
286 end 286 end
287 287
288 function api:get_option_path(name, default, parent) 288 function api:get_option_path(name, default, parent)
289 if parent == nil then 289 if parent == nil then
290 parent = parent or self:get_directory(); 290 parent = self:get_directory();
291 elseif prosody.paths[parent] then 291 elseif prosody.paths[parent] then
292 parent = prosody.paths[parent]; 292 parent = prosody.paths[parent];
293 end 293 end
294 local value = self:get_option_string(name, default); 294 local value = self:get_option_string(name, default);
295 if value == nil then 295 if value == nil then