From 5434aaf8b789401ad04d7331bcfad3fd5de3726e Mon Sep 17 00:00:00 2001 From: Ardenian Date: Mon, 10 Apr 2017 15:49:06 +0200 Subject: [PATCH] storing request in variable --- src/mods/land.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mods/land.js b/src/mods/land.js index 2cec3ee..8f42bb1 100644 --- a/src/mods/land.js +++ b/src/mods/land.js @@ -129,8 +129,9 @@ idrinth.land = { } document.getElementById ( 'idrinth-land-gold' ).value = idrinth.settings.get ( "land#gold" ); }; - for (var key in idrinth.settings.get ( "land", true )) { - if ( idrinth.settings.get( "land", true ).hasOwnProperty( key ) ) { + var landSettings = idrinth.settings.get( "land", true ); + for (var key in landSettings ) { + if ( landSettings.hasOwnProperty( key ) ) { idrinth.settings.change( 'land#' + key, parseInt( document.getElementById( 'idrinth-land-' + key ).value, 10 ) ); } }