Skip to content

Commit

Permalink
Merge pull request #192 from ppfeufer/fix-empty-string-check
Browse files Browse the repository at this point in the history
  • Loading branch information
ppfeufer authored Apr 5, 2024
2 parents f7fa1cd + 67ca73f commit 4de939c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Section Order:
### Security
-->

## \[3.0.2\] - 2024-04-05

### Fixed

- Empty string checks in JS

## \[3.0.1\] - 2024-04-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion fleetpings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Django
from django.utils.translation import gettext_lazy as _

__version__ = "3.0.1"
__version__ = "3.0.2"
__title__ = _("Fleet Pings")
6 changes: 3 additions & 3 deletions fleetpings/static/fleetpings/js/fleetpings.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $(document).ready(() => {

// Formup locations
getDataFromAjaxUrl(fleetpingsSettings.url.formupLocations).then(formupLocations => {
if (formupLocations !== '') {
if (formupLocations.trim() !== '') {
$(fleetpingsVars.inputFormupLocation).after(formupLocations);

const optsFormupLocation = Object.assign(
Expand All @@ -129,7 +129,7 @@ $(document).ready(() => {

// Fleet comms
getDataFromAjaxUrl(fleetpingsSettings.url.fleetComms).then(fleetComms => {
if (fleetComms !== '') {
if (fleetComms.trim() !== '') {
$(fleetpingsVars.inputFleetComms).after(fleetComms);

const optsFleetComms = Object.assign(
Expand All @@ -151,7 +151,7 @@ $(document).ready(() => {

// Fleet doctrines
getDataFromAjaxUrl(fleetpingsSettings.url.fleetDoctrines).then(fleetDoctrines => {
if (fleetDoctrines !== '') {
if (fleetDoctrines.trim() !== '') {
$(fleetpingsVars.inputFleetDoctrine).after(fleetDoctrines);

const optsFleetDoctrine = Object.assign(
Expand Down
2 changes: 1 addition & 1 deletion fleetpings/static/fleetpings/js/fleetpings.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4de939c

Please sign in to comment.