From c93acdfc87f7e32496df0fe40d1b4365079242b7 Mon Sep 17 00:00:00 2001 From: John McLear Date: Wed, 9 Oct 2013 16:14:16 +0100 Subject: [PATCH] suggestion --- src/node/db/PadManager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/node/db/PadManager.js b/src/node/db/PadManager.js index 7d546fc71..b869530f3 100644 --- a/src/node/db/PadManager.js +++ b/src/node/db/PadManager.js @@ -85,7 +85,6 @@ var padList = { } }; //initialises the allknowing data structure -padList.init(); /** * An array of padId transformations. These represent changes in pad name policy over @@ -159,6 +158,11 @@ exports.getPad = function(id, text, callback) exports.listAllPads = function(callback) { + // console.warn("list all pads") + if(!padList.list.length == 0){ // If we haven't populated the padList.list yet + // console.warn("pad list is empty, filling it"); + padList.init(); + } if(callback != null){ callback(null,{padIDs: padList.getPads()}); }else{