Skip to content

Commit

Permalink
Merge pull request #10 from lightspeeddevelopment/fix/9
Browse files Browse the repository at this point in the history
- Fixed the issue `PHP Notice: Undefined index: fullscreen`,
  • Loading branch information
Virginia Garcia Ortiz authored Mar 23, 2020
2 parents 935360d + 557e7a0 commit 2f14cb6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions assets/js/views/configurator.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@

processWidget: function( widget ) {
var model, childWidgetItemView, widgetExists;

if ( ! widget.id ) {
if ( undefined == widget ) {
return;
}

model = JSON.stringify(this.model.get( 'widgets' ) );
model = this.model.get( 'widgets' ).get( widget.id );

// Add widget model to collection
Expand All @@ -287,7 +287,7 @@
if ( widgetView.id === widget.id ) {
return widgetView;
}

console.log( 'test 3' + widgetView );
return false;
});

Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Change log


## [Unreleased] - Minor version 1.2.5

### Fixed
- Fixed the issue `PHP Notice: Undefined index: fullscreen`,
- Fixed the issue `Uncaught TypeError: Cannot read property 'id' of undefined`.

### Security
- General testing to ensure compatibility with latest WordPress version (5.4).
- General testing to ensure compatibility with latest LSX Theme version (2.7).
Expand Down
3 changes: 2 additions & 1 deletion includes/class-lsxmm-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ private function _is_mega_menu_fullscreen( $item_id ) {
$saved_data = get_option( 'LSXMM_DATA' );
if ( $saved_data && array_key_exists( intval( $item_id ), $saved_data ) ) {
$mega_menu = $saved_data[ intval( $item_id ) ];
if ( ! isset( $mega_menu['fullscreen'] ) || false === $mega_menu['fullscreen'] ) {

if ( ! isset( $mega_menu['fullscreen'] ) || false === $mega_menu['fullscreen'] || '' === $mega_menu['fullscreen'] ) {
return false;
}
return true;
Expand Down

0 comments on commit 2f14cb6

Please sign in to comment.