Skip to content

Commit

Permalink
Fix copy timeline modal actions
Browse files Browse the repository at this point in the history
  • Loading branch information
masaball committed Jan 11, 2024
1 parent e5e6b74 commit 341b694
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/assets/javascripts/avalon_timelines/timelines.js.coffee
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2011-2023, The Trustees of Indiana University and Northwestern
# University. Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
#
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
Expand Down Expand Up @@ -66,11 +66,11 @@ $('#copy-timeline-form').submit(

$('#copy-timeline-form').bind('ajax:success',
(event, data, status, xhr) ->
if (data.errors)
if (data?.errors)
console.log(data.errors.title[0])
else
if (submit_edit)
window.location.href = data.path
window.location.href = event.detail[0].path
else
if ( $('#with_refresh').val() )
location.reload()
Expand Down

0 comments on commit 341b694

Please sign in to comment.