Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #309 from IDotD/ardenian
Browse files Browse the repository at this point in the history
Ardenian
  • Loading branch information
Idrinth authored Apr 10, 2017
2 parents b9949c2 + 5434aaf commit dd4194f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/mods/land.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ idrinth.land = {
}
document.getElementById ( 'idrinth-land-gold' ).value = idrinth.settings.get ( "land#gold" );
};
for (var key in idrinth.settings.get ( "land", true )) {
idrinth.settings.change ( 'land#' + key, parseInt ( document.getElementById ( 'idrinth-land-' + key ).value, 10 ) );
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 ) );
}
}
var results = baseCalculator ( getRequirements () );
if ( Object.keys ( results ).length === 0 ) {
Expand Down
10 changes: 7 additions & 3 deletions src/stable.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ var idrinth = {
reload: function ( ) {
window.clearTimeout ( idrinth.core.timeouts.next );
idrinth.ui.removeElement ( 'idotd-base' );
for (var event in idrinth.core.multibind.events) {
document.getElementsByTagName ( 'body' )[0].removeEventListener ( event, idrinth.core.multibind.triggered );
for ( var event in idrinth.core.multibind.events ) {
if ( idrinth.core.multibind.events.hasOwnProperty( event ) ) {
document.getElementsByTagName( 'body' )[0].removeEventListener( event, idrinth.core.multibind.triggered );
}
}
for (var observer in idrinth.observer.list) {
idrinth.observer.list[observer].disconnect();
if ( idrinth.observer.list.hasOwnProperty( observer ) ) {
idrinth.observer.list[observer].disconnect();
}
}
window.setTimeout ( function () {
idrinth = { };
Expand Down

0 comments on commit dd4194f

Please sign in to comment.